๐ฆ Cache::SharedMemoryCache โ extends the MemoryCache.
| Use Case | Command | Description |
|---|---|---|
| ๐ฆ Create shared memory cache | Cache::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 instead | Cache::FileCache | โ Recommended replacement โ better performance, no size limits, cross-platform |
๐ 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:
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" );
๐ See Cache::Cache for the API documentation.
๐ See Cache::Cache for the standard options.
๐ See Cache::Cache for the default properties.
๐๏ธ Original author: DeWitt Clinton <dewitt AT unto.net>
๐ Last author: $Author: dclinton $
ยฉ๏ธ Copyright (C) 2001-2003 DeWitt Clinton
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/)