Cache::Mmap

Cache::Mmap Perl module helps you to share data cache using memory mapped files.
Download

Cache::Mmap Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Peter Haworth
  • Publisher web site:
  • http://search.cpan.org/~pmh/Test-SerialFork-0.01/lib/Test/SerialFork.pm

Cache::Mmap Tags


Cache::Mmap Description

Cache::Mmap Perl module helps you to share data cache using memory mapped files. Cache::Mmap Perl module helps you to share data cache using memory mapped files.SYNOPSIS use Cache::Mmap; $cache=Cache::Mmap->new($filename,%options); $val1=$cache->read($key1); $cache->write($key2,$val2); $cache->delete($key3);This module implements a shared data cache, using memory mapped files. If routines are provided which interact with the underlying data, access to the cache is completely transparent, and the module handles all the details of refreshing cache contents, and updating underlying data, if necessary.Cache entries are assigned to "buckets" within the cache file, depending on the key. Within each bucket, entries are stored approximately in order of last access, so that frequently accessed entries will move to the head of the bucket, thus decreasing access time. Concurrent accesses to the same bucket are prevented by file locking of the relevant section of the cache file.CONFIGURATION METHODSThese methods are used to examine/update the configuration of a cache. Most of these methods are read-only, and the value returned may be different to that passed to the constructor, since the cache may have been created by an earlier process which specified different parameters.buckets()Returns the number of buckets in the cache file.bucketsize()Returns the size of buckets (in bytes) in the cache file.cachenegative()Returns true if items not found in the underlying data are cached anyway.context()Returns the context data for reads and writes to the underlying data.context($context)Provides new context data for reads and writes to the underlying data.expiry()Returns the time in seconds cache entries are considered valid for, or zero for indefinite validity.pagesize()Returns the page size (in bytes) of the cache file.strings()Returns true if the cache stores strings rather than references.writethrough()Returns true if items written to the cache are immediately written to the underlying data. Requirements: · Perl


Cache::Mmap Related Software