[Dbix-class] Resultset with memcached

John Goulah jgoulah at gmail.com
Thu Jan 10 15:19:34 GMT 2008

On Jan 10, 2008 3:50 AM, Tobias Kremer <list at funkreich.de> wrote:

> Quoting sindharta_tanuwijaya at yahoo.co.jp:
> > Actually, I think that the bottleneck in my case here is the time it
> takes to
> > perform database queries. I haven't tried DBIx::Class::Cursor::Cached
> yet,
> The bottleneck almost always is the database :)
> > but looking at the posts, it seems more appropriate for me than
> > Cache::Memcached. Any thought how long a value will stay (valid) inside
> the
> >  cache in DBIx::Class::Cursor::Cached ?
> DBIx::Class::Cursor::Cached is not a replacement for Cache::Memcached. It
> just
> makes ResultSets cachable in an easy way. The main caching is still done
> via
> one of the available cache modules (like Cache::Memcached). The POD
> example of
> DBIx::Class::Cursor::Cached uses Cache::FileCache:

If I understand correctly,  DBIx::Class::Cursor::Cached (cache_for) doesn't
cache the actual resultset object, but the actual data, so you are still
constructing the objects and then filling them with cached data.  This type
of caching is great to use the same data for multiple requests.  If you want
to cache the object I believe  you want to use 'cache'  but it lives only
for the lifetime of that object.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080110/1b5=

More information about the DBIx-Class mailing list