man > Cache::MemoryCache

Cache::MemoryCache(3pm) β€” User Contributed Perl Documentation

πŸ“› NAME

Cache::MemoryCache β€” implements the Cache interface.

πŸš€ Quick Reference

Use Case Command Description
Create a memory cache my $cache = new Cache::MemoryCache({ 'namespace' => 'MyNS', 'default_expires_in' => 600 }); Instantiate a per-process memory cache with namespace and default expiry 🧠
Store data $cache->set( $key, $data, $expires_in ); Save data under a key, optionally overriding expiry ⏳
Retrieve data my $data = $cache->get( $key ); Fetch data by key; returns undef if missing or expired πŸ”

ℹ️ Full API & options ⟢ Cache::Cache

πŸ“– DESCRIPTION

The MemoryCache class implements the Cache interface. This cache stores data on a per‑process basis. It is the ⚑ fastest of the cache implementations, but data πŸ”’ cannot be shared between processes. Data remains in the cache until it is cleared, expires, or the process dies ♻️. The cache object simply going out of scope will not destroy the data 🌬️.

πŸ“‹ SYNOPSIS

use Cache::MemoryCache;

my $cache = new Cache::MemoryCache( { 'namespace' => 'MyNamespace',
                                      'default_expires_in' => 600 } );

πŸ“¦ Cache::MemoryCache module. See Cache::Cache for the usage synopsis.

πŸ”§ METHODS

ℹ️ See Cache::Cache for the API documentation.

βš™οΈ OPTIONS

ℹ️ See Cache::Cache for standard options.

πŸ“Œ PROPERTIES

ℹ️ See Cache::Cache for default properties.

πŸ“š SEE ALSO

Cache::Cache

✍️ AUTHOR

Original author: DeWitt Clinton <dewitt AT unto.net>
Last author: $Author: dclinton $
Copyright (C) 2001-2003 DeWitt Clinton

Cache::MemoryCache
πŸ“› NAME πŸš€ Quick Reference πŸ“– DESCRIPTION πŸ“‹ SYNOPSIS πŸ”§ METHODS βš™οΈ OPTIONS πŸ“Œ PROPERTIES πŸ“š SEE ALSO ✍️ AUTHOR

Generated by phpman v4.9.25-3-gdbaf087 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-06 22:53 @216.73.217.93
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format