djzort has asked for the wisdom of the Perl Monks concerning the following question:
friends,
I have a model which talks to a non-database source of data in my catalyst application. It is more or less a manual model which simply extends Catalyst::Model.
I would like to cache via Catalysts Cache plugin's, to hold various data as makes sense to me
Having loaded a cache plugin, the 'cache' method is available on the context object i.e. $c - however the $self object made available to the model's function doesnt seem to contain any methods for accessing the cache.
Having read through the relevant pod at http://search.cpan.org/~bobtfish/Catalyst-Plugin-Cache-0.12/lib/Catalyst/Plugin/Cache.pm it explains the controller usage, but doesnt mention if models can also use the cache
The DBIc model makes use of cache plugins, but it's example has proved to be unhelpful
Can someone lend me their insight?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Catalyst, Accessing Cache plugins from Models
by Your Mother (Archbishop) on Mar 21, 2014 at 16:29 UTC | |
|
Re: Catalyst, Accessing Cache plugins from Models
by Anonymous Monk on Mar 21, 2014 at 07:57 UTC | |
by djzort (Sexton) on Mar 23, 2014 at 06:24 UTC | |
by Anonymous Monk on Mar 23, 2014 at 09:19 UTC | |
by djzort (Sexton) on Mar 25, 2014 at 03:16 UTC | |
by Your Mother (Archbishop) on Mar 25, 2014 at 03:57 UTC |