man DBIx::Class::ObjectCache () - Cache rows by primary key (EXPERIMENTAL)

NAME

    DBIx::Class::ObjectCache - Cache rows by primary key (EXPERIMENTAL)

SYNOPSIS

    # in your class definition
    use Cache::FastMmap;
    __PACKAGE__->cache(Cache::FastMmap->new);

DESCRIPTION

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 CW$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 CWcache. It can be set to any object that implements the required CWget, CWset, and CWremove methods.

AUTHORS

David Kamholz <dkamholz@cpan.org>

LICENSE

You may distribute this code under the same terms as Perl itself.