DBIx::Class::Cursor::Cached(3pm)

DBIx::Class::Cursor::Cached3pm

Cursor class with built-in caching support

Usage

  my $schema = SchemaClass->connect(
    $dsn, $user, $pass, { cursor_class => 'DBIx::Class::Cursor::Cached' }
  );
  $schema->default_resultset_attributes({
    cache_object => Cache::FileCache->new({ namespace => 'SchemaClass' }),
  });
  my $rs = $schema->resultset('CD')->search(undef, { cache_for => 300 });
  my @cds = $rs->all; # fills cache
  $rs = $schema->resultset('CD')->search(undef, { cache_for => 300 });
    # refresh resultset
  @cds = $rs->all; # uses cache, no SQL run
  $rs->cursor->clear_cache; # deletes data from cache
  @cds = $rs->all; # refills cache

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 5 times.

  1. 6.0
  2. 7–8
  3. 9–10
  4. 11
  5. 12
  6. 13

Author

Matt S Trout <[email protected]> http://www.shadowcat.co.uk/

Initial development sponsored by and (c) Takkle, Inc. 2007

License

This library is free software under the same license as perl itself

From libdbix-class-cursor-cached-perl 1.001004-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.