NAME
Wombat::SessionManager::StandardSessionManager - caching session manager implementation
SYNOPSIS
DESCRIPTION
Subclass of Wombat::SessionManager::SessionManagerBase that uses an implementation of Cache::Cache to manage a lightweight cache of sessions. Typically Cache::MemoryCache will be used in single-process scenarios; Cache::SharedMemoryCache is useful for multi-process deployments. This class does not support any persistence or distributable capabilities.
CONSTRUCTOR
- new()
-
Construct and return a Wombat::SessionManager::StandardSessionManager instance, initializing fields appropriately. If subclasses override the constructor, they must be sure to call
$self->SUPER::new();
ACCESSOR METHODS
- getCacheClass()
-
Return the cache class for this SessionManager.
- setCacheClass($class)
-
Set the cache class for this SessionManager.
Parameters:
PUBLIC METHODS
PACKAGE METHODS
- add($session)
-
Add this Session to the cache of active Sessions for this SessionManager.
Parameters:
- getName()
-
Return the display name of this SessionManager.
- getSession($id)
-
Return the active Session cached by this SessionManager with the specified id, or
undef
if no session exists with that id.Parameters:
- getSessions()
-
Return an array containing the active Sessions cached by this SessionManager.
- remove($session)
-
Remove this Session from this SessionManager's cache.
Parameters:
- save($session)
-
Write the current state of this Session to this SessionManager's cache.
Parameters:
LIFECYCLE METHODS
- start()
-
Prepare for active use of this SessionManager and initialize the session cache. This method should be called before any of the public methods of the SessionManager are utilized.
Throws:
SEE ALSO
Cache::Cache, Wombat::Container, Wombat::Core::Session, Wombat::SessionManager::SessionManagerBase
AUTHOR
Brian Moseley, bcm@maz.org