You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by DeWitt Clinton <de...@unto.net> on 2001/09/19 14:53:20 UTC

[ANNOUNCE] Cache::Cache 0.09

[Note:  A big thanks to everyone on modperl that has provided
invaluable insight and support for this release.]

Summary:

  The Perl Cache package provides Cache::Cache, a generic interface
  for creating persistent data stores.  This interface is implemented
  by the Cache::MemoryCache, Cache::SharedMemoryCache, Cache::FileCache, 
  Cache::SizeAwareFileCache, Cache::SizeAwareMemoryCache, and 
  Cache::SizeAwareSharedMemoryCache classes.  This work replaces 
  File::Cache and IPC::Cache.


Release Notes:

  This release fixes outstanding bugs in cache instantiation and race
  condition handling, and is the first release under the dual
  GPL/Artistic license.


Project Homepage:

  http://sourceforge.net/projects/perl-cache/


Tar/GZ:

  http://www.cpan.org/modules/by-module/Cache/Cache-Cache-0.09.tar.gz



Changelog:

  http://sourceforge.net/project/shownotes.php?release_id=52255

  - applied Axel Beckert patch to fix the expiration units
  - applied Ken Williams's directory creation patch to pass all tests
  - changed the license to be either the GPL or the Artistic license
  - added Jay Sachs' implementation of NullCache
  - modified the remove methods to avoid croaking if two cache
    instances are both purging or limiting at the same time
  - migrated to a factory-like model with private contructors
    to fix the auto_purge_interval functionality
  - updated the documentation to better reflect that size means
    size in bytes


CVS tree (viewcvs):

  http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/perl-cache/



The following is the Cache-Cache-0.09 README file:



Copyright (C) 2001 DeWitt Clinton  All Rights Reserved

   You may distribute under the terms of either the GNU General Public
   License or the Artistic License, as specified in the Perl README file.


NAME

  Cache::Cache


DESCRIPTION

  The Perl Cache package provides Cache::Cache, a generic interface
  for creating persistent data stores.  This interface is implemented
  by the Cache::MemoryCache, Cache::SharedMemoryCache, Cache::FileCache, 
  Cache::SizeAwareFileCache, Cache::SizeAwareMemoryCache, and 
  Cache::SizeAwareSharedMemoryCache classes.  This work replaces 
  File::Cache and IPC::Cache.


REQUIREMENTS

  Digest::MD5
  File::Spec
  File::Path
  IPC::ShareLite
  Storable


INSTALLATION

  perl Makefile.PL
  make
  make test
  make install


USAGE

  First, choose the best type of cache implementation for your needs.
  The simplest cache is the MemoryCache, which is suitable for
  applications that are serving multiple sequential requests, and
  which to avoid making redundant expensive queries, such as an
  Apache/mod_perl application talking to a database.  If you wish to
  share that data between processes, then perhaps the
  SharedMemoryCache is appropriate, although its behavior is tightly
  bound to the underlying IPC mechanism, which varies from system to
  system, and is unsuitable for large objects or large numbers of
  objects.  When the SharedMemoryCache is not acceptable, then
  FileCache offers all of the same functionality with similar
  performance metrics, and it is not limited in terms of the number of
  objects or their size.  If you wish to maintain a strict limit on
  the size of a file system based cache, then the SizeAwareFileCache
  is the way to go.  Similarly, the SizeAwareMemoryCache and the
  SizeAwareSharedMemoryCache add size management functionality
  to the MemoryCache and SharedMemoryCache classes respectively.

 
  Using a cache is simple.  Here is some sample code for instantiating
  and using a MemoryCache:

    use Cache::Cache qw( $EXPIRES_NEVER $EXPIRES_NOW );
    use Cache::MemoryCache;

    my $options_hash_ref = { 'default_expires_in' => '10 seconds' };

    my $cache = new Cache::MemoryCache( $options_hash_ref );

    my $expires_in = '10 minutes';

    $cache->set( 'Key', 'Value', $expires_in );

    # if the next line is called within 10 minutes, then this 
    # will return the cache value

    my $value = $cache->get( 'Key' );


  Please refer to the perldoc for Cache::Cache and the related
  implementations for complete documentation.


SEE ALSO

  File::Cache and IPC::Cache, and the project homepage at:

    http://sourceforge.net/projects/perl-cache/


AUTHOR

  Original author: DeWitt Clinton <de...@unto.net>

  Last author:     $Author: dclinton $

  Copyright (C) 2001 DeWitt Clinton