GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DBIX::CLASS::CURSOR::CACHED (3)

.ds Aq ’

NAME

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

CONTENTS

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
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DBIX::CLASS::CURSOR::CACHED (3) 2011-08-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.