NAME
Maplat::Web::SessionSettings - save and load session/module specific data
SYNOPSIS
This module provides handling module-specific data handling on a per session basis
DESCRIPTION
This module provides a simple interface to memcached for saving and loading module specific data on a per session basis. It can, for example, be used to save session specific filters to memcache. It can handle complex data structures.
Data is not permanently stored, but rather it's deleted when a user logs out or the session times out (auto user logout)
Configuration
<module>
<modname>sessionsettings</modname>
<pm>SessionSettings</pm>
<options>
<memcache>memcache</memcache>
<login>authentification</login>
</options>
</module>
set
This function adds or updates a setting (data structure) in memcache.
It takes two arguments, $settingname is the key name of the setting, and $settingref is a reference to the data structure you want to store, e.g.:
$is_ok = $us->set($settingname, $settingref);
It returns a boolean to indicate success or failure.
get
This function reads a setting from memcached and returns a reference to the data structure.
It takes one arguments, $settingname is the key name of the setting.
$settingref = $us->get($settingname);
delete
This function deletes a setting from database and returns a boolean to indicate success or failure.
It takes one arguments, $settingname is the key name of the setting.
$is_ok = $us->delete($settingname);
list
This function lists all available settings for a session.
@settingnames = $us->list();
on_login
Internal function.
on_logout
Internal function.
on_refresh
Internal function.
Dependencies
This module depends on the following modules beeing configured (the 'as "somename"' means the key name in this modules configuration):
Maplat::Web::Memcache as "memcache" Maplat::Web::Login as "login"
SEE ALSO
Maplat::Web Maplat::Web::Memcache Maplat::Web::Login
AUTHOR
Rene Schickbauer, <rene.schickbauer@magnapowertrain.com>
COPYRIGHT AND LICENSE
Copyright (C) 2009 by Rene Schickbauer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.