info > Cache::SharedMemoryCache

๐Ÿงพ NAME

๐Ÿ“ฆ Cache::SharedMemoryCache โ€” extends the MemoryCache.

๐Ÿš€ Quick Reference

Use CaseCommandDescription
๐Ÿ“ฆ Create shared memory cacheCache::SharedMemoryCache->new( \%options )๐Ÿ”— Instantiate a new shared memory cache with namespace and expiry
โš™๏ธ Set namespace'namespace' => 'MyNamespace'๐Ÿท๏ธ Isolate cache entries under a logical namespace
โฑ๏ธ Set default expiry'default_expires_in' => 600โณ Set default TTL in seconds (600 = 10 min)
๐Ÿ“„ Use FileCache insteadCache::FileCacheโœ… Recommended replacement โ€” better performance, no size limits, cross-platform

๐Ÿ“– DESCRIPTION

๐Ÿ”— The SharedMemoryCache extends the MemoryCache class and binds the data store to shared memory so that separate processes can use the same cache.

โš ๏ธ Official recommendation is now to use FileCache instead of SharedMemoryCache. The reasons include:

๐Ÿ“‹ SYNOPSIS

use Cache::SharedMemoryCache;

my %cache_options = ( 'namespace' => 'MyNamespace',
                      'default_expires_in' => 600 );

my $shared_memory_cache =
  new Cache::SharedMemoryCache( \%cache_options ) or
    croak( "Couldn't instantiate SharedMemoryCache" );

๐Ÿ”ง METHODS

๐Ÿ‘‰ See Cache::Cache for the API documentation.

โš™๏ธ OPTIONS

๐Ÿ‘‰ See Cache::Cache for the standard options.

๐Ÿ“Œ PROPERTIES

๐Ÿ‘‰ See Cache::Cache for the default properties.

๐Ÿ”— SEE ALSO

๐Ÿ‘ค AUTHOR

๐Ÿ–‹๏ธ Original author: DeWitt Clinton <dewitt AT unto.net>

๐Ÿ”„ Last author: $Author: dclinton $

ยฉ๏ธ Copyright (C) 2001-2003 DeWitt Clinton

Cache::SharedMemoryCache
๐Ÿงพ NAME ๐Ÿš€ Quick Reference ๐Ÿ“– DESCRIPTION ๐Ÿ“‹ SYNOPSIS ๐Ÿ”ง METHODS โš™๏ธ OPTIONS ๐Ÿ“Œ PROPERTIES ๐Ÿ”— SEE ALSO ๐Ÿ‘ค AUTHOR

Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-16 09:55 @2600:1f28:365:80b0:7cb9:fb:26c1:e368
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!