Hello:

A few months ago I wrote to [EMAIL PROTECTED] asking about the
Cache::Cache namespace.  I didn't receive any feedback at the time,
and have since written set of packages using this namespace.  The
Cache::Cache module itself is an interface class that provides a
generic API for storing data.  The cache API has matured over the last
few years as the common interface to both File::Cache and IPC::Cache.
The Cache-Cache distribution contains many different implementations
of this interface, including the Cache::MemoryCache, Cache::FileCache,
Cache::SharedMemoryCache, Cache::SizeAwareFileCache, among others.
This module is intended to unify and replace the prior work on
File::Cache and IPC::Cache, as well as offer a starting point and
interface for other cache implementations.

I would like to submit this code to CPAN.  I have been actively
developing this code with the support of many people in the mod_perl
community.  Attached to this email is the announcement of the most
recent version of the code.

Feedback and comments are welcomed at [EMAIL PROTECTED]

Best regards,

-DeWitt



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 adds the get_identifiers( ) method to the cache
  interface, includes a rewritten and improved mechanism for
  limiting the cache size, transparently locks shared memory 
  caches, and contains minor bug fixes. 


Project Homepage:

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


Tar/GZ:

  http://ftp1.sourceforge.net/perl-cache/Cache-Cache-0.06.tar.gz


Changelog:

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


CVS tree (cvsweb):

  http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi?cvsroot=perl-cache



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

Copyright (C) 2001 DeWitt Clinton  All Rights Reserved
     
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 1, or (at your option)
   any later version.
      
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


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


AUTHOR

  Original author: DeWitt Clinton <[EMAIL PROTECTED]>

  Last author:     $Author: dclinton $

  Copyright (C) 2001 DeWitt Clinton

Reply via email to