Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cache::sharedmemorycache(3pm) [debian man page]

Cache::SharedMemoryCache(3pm)				User Contributed Perl Documentation			     Cache::SharedMemoryCache(3pm)

NAME
Cache::SharedMemoryCache -- extends the MemoryCache. DESCRIPTION
The SharedMemoryCache extends the MemoryCache class and binds the data store to shared memory so that separate process can use the same cache. The official recommendation is now to use FileCache instead of SharedMemoryCache. The reasons for this include: 1) FileCache provides equal or better performance in all cases that we've been able to test. This is due to all modern OS's ability to buffer and cache file system accesses very well. 2) FileCache has no real limits on cached object size or the number of cached objects, whereas the SharedMemoryCache has limits, and rather low ones at that. 3) FileCache works well on every OS, whereas the SharedMemoryCache works only on systems that support IPC::ShareLite. And IPC::ShareLite is an impressive effort -- but think about how hard it is to get shared memory working properly on *one* system. Now imagine writing a wrapper around shared memory for many operating systems. 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
Cache::Cache, Cache::MemoryCache AUTHOR
Original author: DeWitt Clinton <dewitt@unto.net> Last author: $Author: dclinton $ Copyright (C) 2001-2003 DeWitt Clinton perl v5.12.4 2009-03-01 Cache::SharedMemoryCache(3pm)

Check Out this Related Man Page

Cache::FileCache(3pm)					User Contributed Perl Documentation				     Cache::FileCache(3pm)

NAME
Cache::FileCache -- implements the Cache interface. DESCRIPTION
The FileCache class implements the Cache interface. This cache stores data in the filesystem so that it can be shared between processes. SYNOPSIS
use Cache::FileCache; my $cache = new Cache::FileCache( { 'namespace' => 'MyNamespace', 'default_expires_in' => 600 } ); See Cache::Cache for the usage synopsis. METHODS
See Cache::Cache for the API documentation. Clear( [$cache_root] ) See Cache::Cache, with the optional $cache_root parameter. Purge( [$cache_root] ) See Cache::Cache, with the optional $cache_root parameter. Size( [$cache_root] ) See Cache::Cache, with the optional $cache_root parameter. OPTIONS
See Cache::Cache for standard options. Additionally, options are set by passing in a reference to a hash containing any of the following keys: cache_root The location in the filesystem that will hold the root of the cache. Defaults to the 'FileCache' under the OS default temp directory ( often '/tmp' on UNIXes ) unless explicitly set. cache_depth The number of subdirectories deep to cache object item. This should be large enough that no cache directory has more than a few hundred objects. Defaults to 3 unless explicitly set. directory_umask The directories in the cache on the filesystem should be globally writable to allow for multiple users. While this is a potential security concern, the actual cache entries are written with the user's umask, thus reducing the risk of cache poisoning. If you desire it to only be user writable, set the 'directory_umask' option to '077' or similar. Defaults to '000' unless explicitly set. PROPERTIES
See Cache::Cache for default properties. (get|set)_cache_root See the definition above for the option cache_root (get|set)_cache_depth See the definition above for the option cache_depth (get|set)_directory_umask See the definition above for the option directory_umask SEE ALSO
Cache::Cache AUTHOR
Original author: DeWitt Clinton <dewitt@unto.net> Last author: $Author: dclinton $ Copyright (C) 2001-2003 DeWitt Clinton perl v5.12.4 2009-03-01 Cache::FileCache(3pm)
Man Page