Apache-SharedMem
view release on metacpan or search on metacpan
Apache::SharedMem version 0.09
===============================
This module make it easer to share data between Apache children
processes trough the shared memory. This module internal working
is a lot inspired by IPC::SharedCache, but without any cache
managment. The share memory segment key is automatically deduced
by the caller package name, that's mine 2 modules can use same
keys (variable's name) without be concerned about namespace clash.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
This module requires these other modules and libraries:
IPC::ShareLite
IPC::SysV
Storable
Data::Dumper
CHANGES
0.09 Thu Oct 4, 2001 13:54:53
- Major bugfix that made the module unusable under mod_perl !
0.08 Tue Oct 2, 2001 16:19:08
- status() now return bitmask values.
- get() method can know return undef() when value in undefined instead of void string.
- Bugfix in test scripts: don't failed if PWD environment variable isn't set.
0.07 Mon August 27, 2001 18:36:52
- Implement a more efficient IPC key generation for the root segment, using
the system ftok() function provied by IPC::SysV module
- Pod documentation
- Default IPC mode is now 0600
- We now keep ipc_mode and ipc_segment_size in the root map for calling IPC::ShareLite
with same values.
- Add "readonly" parameter to constructor
- Feature enhancement, add "dump" and "dump_map" methods
- Data::Dumper is now autoused
- Feature enhancement, release method now release root map when it go empty
- Feature enhancement, add a "destroy" method, that call "release" method on all root-map's
namespaces. Usefull for cleaning shared memory on Apache shutdown.
- Adding tools to package for debuging purpose
- Bugfix in delete method, for problem on root map cleanup
- Better support of mod_perl
- Minor bugfix in _init_namespace method
- Misc bugfixes
0.06 Mon August 20, 2001 15:55:50
- Correction of an "undefined value" bug when lock method was called without
arguments.
- Forcing default lock to LOCK_EX
0.05 Tue Jully 03, 2001 17:41:30
- Implementation of timeout in lock method and integration of it in all
public methods
- Bug fix, mispelling of DESCRIPTION section in documentation (make warning
with make)
- Bug fix, timeout in delete method (delete call 'exists' method without
his timeout value)
- use of bitwise operators in smartlock
0.04 Wen Junary 27, 2001 08:58:54
- Bug fix, smartlock bug with set method
- Bug fix, major bug in delete method
- Bug fix, dupplicated entries in EXPORT_TAGS
0.03 Tue Junary 26, 2001 21:09:46
- Major bug fix
0.02 Tue Junary 26, 2001 14:20:02
- Documentation updates
- Add of :all export tag
- Implementation of multi-level debug
0.01 Thu Junary 21, 2001 23:37:46
- Original version based on IPC::SharedCache but rewritten from scratch.
Very experimental code, don't use it for production purpose !
- Implementation of automated unique namespace based on package caller
- Implementation of smartlock mechanisme (see documentation)
NAME
Apache::SharedMem - Share data between Apache children processes through
the shared memory
SYNOPSIS
use Apache::SharedMem qw(:lock :status);
my $share = new Apache::SharedMem || die($Apache::SharedMem::ERROR);
$share->set(key => 'some data');
# ...maybe in another apache child
my $var = $share->get(key);
$share->delete(key);
# delete all keys if the total size is larger than $max_size
$share->clear if($share->size > $max_size);
( run in 0.681 second using v1.01-cache-2.11-cpan-39bf76dae61 )