Hey::Cache

Cache data multiple data structures
Download

Hey::Cache Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dusty Wilson
  • Publisher web site:
  • http://search.cpan.org/~wilsond/

Hey::Cache Tags


Hey::Cache Description

Cache data multiple data structures Hey::Cache is a Perl module to cache data multiple data structures.SYNOPSIS use Hey::Cache; my $cache = Hey::Cache->new( Namespace => 'WeatherApp2000', # string (optional, default='default') CacheFile => 'fun_cache_file.xml', # file path and name (optional, default='cache.xml') AutoSync => 1, # boolean (optional, default=1) Expires => 300, # seconds (optional, default=86400) ); $cache->set( Name => '98501', # sets the name/key of the piece of data Value => { Temperature => 17, # sets the data that you wish to cache Condition => 'Rain', High => 19, Low => 7 }, Expires => 600, # optional, defaults to what was set in the constructor above ); $value = $cache->get( Name => '98501' ); # returns what you had set ... enough time passes (at least 10 minutes, according to the "Expires" value) ... $value = $cache->get( Name => '98501' ); # returns undef because it has expired $value = $cache->get( Name => '98501', Expires => 86400 ); # returns what you had set # because it is newer than a day Requirements: · Perl


Hey::Cache Related Software