Data::Session::Driver::Memcached(3pm) | User Contributed Perl Documentation | Data::Session::Driver::Memcached(3pm) |
Data::Session::Driver::Memcached - A persistent session manager
See Data::Session for details.
Data::Session::Driver::Memcached allows Data::Session to manipulate sessions Cache::Memcached.
To use this module do both of these:
See scripts/memcached.pl.
See "Case-sensitive Options" in Data::Session for important information.
Creates a new object of type Data::Session::Driver::Memcached.
"new()" takes a hash of key/value pairs, some of which might mandatory. Further, some combinations might be mandatory.
The keys are listed here in alphabetical order.
They are lower-case because they are (also) method names, meaning they can be called to set or get the value at any time.
This key is normally passed in as Data::Session -> new(cache => $object).
This key is mandatory.
Typical values are 0, 1 and 2.
This key is normally passed in as Data::Session -> new(verbose => $integer).
This key is optional.
Deletes from storage the session identified by $id.
Returns the result of calling the Cache::Memcached method delete($id).
This result is a Boolean value indicating 1 => success or 0 => failure.
Retrieve from storage the session identified by $id.
Returns the result of calling the Cache::Memcached method get($id).
This result is a frozen session. This value must be thawed by calling the appropriate serialization driver's thaw() method.
Data::Session calls the right thaw() automatically.
Writes to storage the session identified by $id, together with its data $data. The expiry time of the object is passed into the set() method of Cache::Memcached, too.
Returns the result of calling the Cache::Memcached method set($id, $data, $time).
This result is a Boolean value indicating 1 => success or 0 => failure.
Note: $time is 0 for sessions which don't expire. If you wish to pass undef or 'never', as per the Cache::Memcached documentation, you will have to subclass Cache::Memcached and override the set() method to change 0 to 'never'.
There is no mechanism (apart from memcached's debug code) to get a list of all keys in a cache managed by memcached, so there is no way to traverse them via this module.
Returns 1.
Get libevent from http://www.monkey.org/~provos/libevent/ I used V 2.0.8-rc ./configure make && make verify sudo make install It installs into /usr/local/lib, so tell memcached where to look: LD_LIBRARY_PATH=/usr/local/lib export LD_LIBRARY_PATH Get memcached from http://memcached.org/ I used V 1.4.5 ./configure --with-libevent=/usr/local/lib make && make test sudo make install Running memcached: memcached -m 5 &
Log a bug on RT: <https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session>.
Data::Session was written by Ron Savage <ron@savage.net.au> in 2010.
Home page: <http://savage.net.au/index.html>.
Australian copyright (c) 2010, Ron Savage.
All Programs of mine are 'OSI Certified Open Source Software'; you can redistribute them and/or modify them under the terms of The Artistic License, a copy of which is available at: http://www.opensource.org/licenses/index.html
2023-02-14 | perl v5.36.0 |