DBIx::Class::Cursor::Cached man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

DBIx::Class::Cursor::CUserdContributed Perl DocuDBIx::Class::Cursor::Cached(3)

NAME
       DBIx::Class::Cursor::Cached - cursor class with built-in caching
       support

SYNOPSIS
	 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

AUTHOR
       Matt S Trout <mst@shadowcat.co.uk> 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

perl v5.14.1			  2011-03-30	DBIx::Class::Cursor::Cached(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net