use namespace::autoclean;
use Moose::Role;
before ACCEPT_CONTEXT => sub {
my ($self, $c) = @_;
...
$self->schema->default_resultset_attributes({
cache_object => $c->cache
});
}
So Your Mother is onto something, all I can say is EEEEW | [reply] [d/l] |
Yeah I had seen that but was hoping there was a "proper" way. Pity.
IMO caching should be available in M, V and C - but that could be a lively debate for another time.
| [reply] |
Well, it is available. You cache output. This is how some sites like github make pretty intensive stuff quite speedy.
You can also propagate the context around with the modules I suggested and share the controller’s cache.
You can also have a memcached or whatever available as a plain extra-app class—CHI is a great choice for this—and instantiate an access object in your M and C and if you really insist, in the V too.
Starts to sound a lot like PHP at this point. :|
| [reply] |