CHI

CHI is an unified cache interface.
Download

CHI Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • P. Scott

CHI Tags


CHI Description

CHI is an unified cache interface. CHI is an unified cache interface.SYNOPSIS use CHI; # Choose a standard driver # my $cache = CHI->new( driver => 'Memory' ); my $cache = CHI->new( driver => 'File', cache_root => '/path/to/root' ); my $cache = CHI->new( driver => 'FastMmap', root_dir => '/path/to/root', cache_size => '1k' ); my $cache = CHI->new( driver => 'Memcached', servers => ); my $cache = CHI->new( driver => 'Multilevel', subcaches => } ], ); # Create your own driver # my $cache = CHI->new( driver_class => 'My::Special::Driver' ); # (These drivers coming soon...) # my $cache = CHI->new( driver => 'DBI', dbh => $dbh, table => 'app_cache' ); my $cache = CHI->new( driver => 'BerkeleyDB', root_dir => '/path/to/root' ); # Basic cache operations # my $customer = $cache->get($name); if ( !defined $customer ) { $customer = get_customer_from_db($name); $cache->set( $name, $customer, "10 minutes" ); } $cache->remove($name);CHI provides a unified caching API, designed to assist a developer in persisting data for a specified period of time.The CHI interface is implemented by driver classes that support fetching, storing and clearing of data. Driver classes exist or will exist for the gamut of storage backends available to Perl, such as memory, plain files, memory mapped files, memcached, and DBI.CHI is intended as an evolution of DeWitt Clinton's Cache::Cache package, adhering to the basic Cache API but adding new features and addressing limitations in the Cache::Cache implementation. Requirements: · Perl


CHI Related Software