DBIx::Class::ObjectCache - Cache rows by primary key (EXPERIMENTAL)
# in your class definition use Cache::FastMmmap; __PACKAGE__->cache(Cache::FastMmap->new);
This class implements a simple object cache. It should be loaded before most (all?) other DBIx::Class components. Note that, in its current state, this code is rather experimental. The only time the cache is made use of is on calls to $obj->find. This can still result in a significant savings, but more intelligent caching, e.g. of the resultset of a has_many call, is currently not possible. It is not difficult, however, to implement additional caching on top of this module.
The cache is stored in a package variable called
cache. It can be set to any object that implements the required
David Kamholz <firstname.lastname@example.org>
You may distribute this code under the same terms as Perl itself.