Fellow Catalysters, I'm intrigued by the Catalyst advent calendar for December 3rd -- http://www.catalystframework.org/calendar/2010/3
I'm already using memcached to cache certain things when I know in advance that a DBIx schema invocation is going to be expensive. There is a problem in that I have to do some work-arounds in order to get what really want, such as caching a rendered pageview generated from the DBIx query instead of caching the resultset or its rows. Why? Because by using Cache::Memcached itself, I've been unable thus far to store DBIx objects--neither resultsets nor rows. While I've pondered using Storable.pm to truly serialize and un-serialize DBIx objects, I haven't ventured to try it for lack of time. So seeing the advent calendar article got me excited, naturally, but now I remain puzzled by it, and here's why... The article mentions the caching of session storage and arbitrary key-value pairs, and does so with a clear demonstration that these two features rely on the memcached backend. But for what I'm most interested in (the caching of DBIx objects) there's no evidence in the article at all that the mentioned"DBIx::Class::Cursor::Cached"uses memcached for its own backend. Instead, whether it does or not is only implied by the title of the article; there's no demonstration of how it uses memcached at all. The reader is just supposed to take it on faith that by including and configuring Catalyst::Plugin::Session::Store::Cache for memcached that you get DBIC object caching for free? That just wasn't enough "sweet loot" (see article) to satisfy my curiosity on the topic and how I'm really going to get memcached DBIC objects. So using the handy links provided in the article that point to the CPAN docs for DBIx::Class::Cursor::Cached I started poking around. Not much to say for the module docs at all, so I dig deeper; looking at the source code I see that the module uses *surprise* Storable, but there's nothing here about memcached at all. Even more confusing is that _none_ of this DBIx module's dependencies include Cache::Memcached. Incidentally the list does include Cache::FileCache and DBD::SQLite - see http://deps.cpantesters.org/?module=DBIx::Class::Cursor::Cached;perl=latest ...(*whine*) But I don't want to use file-based caching or caching of my database query results in (what the !#$@) another (SQLite) database! I want to cache my results in RAM! (*end whine*)... So where does memcached come into play with DBIx::Class::Cursor::Cached? Without more source diving, dare I say that it does not? We have an advent calendar entitled "Painless Memcached Configuration With Catalyst & DBIx::Class", and it seems that the DBIx module for caching doesn't use memcached at all. What's going on? -- Tommy
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
