[Catalyst] DBIC v Cache: What are catalyst best practices
for caching DBIC results (with relationships included)
Matt S Trout
dbix-class at trout.me.uk
Thu Nov 15 15:00:27 GMT 2007
On Thu, Nov 15, 2007 at 11:00:51AM +0100, Tobias Kremer wrote:
> Quoting Ashley Pond V <apv at sedition.com>:
> > 'Cause I'm outta the loop. That looks quite nice. The doc is a bit terse
> > (though that might really be all there is to it). Can you clear just a
> > part of the cache? It's okay if not but I'd like to be able to clear
> > one document or result_set out when it's updated without messing with
> > others that haven't changed.
> Wow, I didn't know this either. Looks promising! Is it considered
> stable and in production use at Takkle?
Yes, and yes.
> I'd also like to know, if it's possible to invalidate the cache after an
> update or insert with Cursor::Cached?
It's a per-query cache; if you'd care to write code that provides scalable
logic to provide a reverse index and know which queries' caches to clear
after any given statement I'd be happy to incorporate it, but without that
you'd have to clear every query for any table touched, which would pretty
much defy the point of having a cache for any site with significant updates.
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
More information about the Catalyst