CHI::Driver::SharedMem - Cache data in shared memory
Version 0.03
CHI driver which stores data in shared memory objects for persistently over processes. Size is an optional parameter containing the size of the shared memory area, in bytes. Shmkey is a mandatory parameter containing the IPC key for the shared memory area. See IPC::SharedMem for more information.
use CHI; my $cache = CHI->new( driver => 'SharedMem', size => 8 * 1024, shmkey => 12344321, # Choose something unique ); # ...
The shared memory area is stored thus:
Number of bytes in the cache [ 4 bytes ] 'cache' => { 'namespace1' => { 'key1' => 'value1', 'key2' -> 'value2', ... } 'namespace2' => { 'key1' => 'value3', 'key3' => 'value2', ... } ... }
Stores an object in the cache
Retrieves an object from the cache
Remove an object from the cache
Removes all data from the cache
Gets a list of the keys in the cache
Gets a list of the namespaces in the cache
If there is no data in the shared memory area, remove it.
Nigel Horne, <njh at bandsman.co.uk>
<njh at bandsman.co.uk>
Please report any bugs or feature requests to bug-chi-driver-sharedmem at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CHI-Driver-SharedMem. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-chi-driver-sharedmem at rt.cpan.org
CHI, IPC::SharedMem;
You can find documentation for this module with the perldoc command.
perldoc CHI::Driver::SharedMem
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CHI-Driver-SharedMem
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/CHI-Driver-SharedMem-Info
CPAN Ratings
http://cpanratings.perl.org/d/CHI-Driver-SharedMem
Search CPAN
http://search.cpan.org/dist/CHI-Driver-SharedMem
Copyright 2012 Nigel Horne.
This program is released under the following licence: GPL
To install CHI::Driver::SharedMem, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CHI::Driver::SharedMem
CPAN shell
perl -MCPAN -e shell install CHI::Driver::SharedMem
For more information on module installation, please visit the detailed CPAN module installation guide.