MediaWiki  REL1_24
ObjectCacheSessionHandler Class Reference

Session storage in object cache. More...

List of all members.

Static Public Member Functions

static close ()
 Callback when closing a session.
static destroy ($id)
 Callback to destroy a session when calling session_destroy().
static gc ($maxlifetime)
 Callback to execute garbage collection.
static getCache ()
 Get the cache storage object to use for session storage.
static getKey ($id)
 Get a cache key for the given session id.
static handleShutdown ()
 Shutdown function.
static install ()
 Install a session handler for the current web request.
static open ($save_path, $session_name)
 Callback when opening a session.
static read ($id)
 Callback when reading session data.
static write ($id, $data)
 Callback when writing session data.

Detailed Description

Session storage in object cache.

Used if $wgSessionsInObjectCache is true.

Definition at line 30 of file ObjectCacheSessionHandler.php.


Member Function Documentation

static ObjectCacheSessionHandler::close ( ) [static]

Callback when closing a session.

NOP.

Returns:
bool Success

Definition at line 86 of file ObjectCacheSessionHandler.php.

static ObjectCacheSessionHandler::destroy ( id) [static]

Callback to destroy a session when calling session_destroy().

Parameters:
string$idSession id
Returns:
bool Success

Definition at line 123 of file ObjectCacheSessionHandler.php.

References getCache().

static ObjectCacheSessionHandler::gc ( maxlifetime) [static]

Callback to execute garbage collection.

NOP: Object caches perform garbage collection implicitly

Parameters:
int$maxlifetimeMaximum session life time
Returns:
bool Success

Definition at line 135 of file ObjectCacheSessionHandler.php.

Get the cache storage object to use for session storage.

Returns:
ObjectCache

Definition at line 54 of file ObjectCacheSessionHandler.php.

References ObjectCache\getInstance(), and global.

Referenced by destroy(), read(), and write().

static ObjectCacheSessionHandler::getKey ( id) [static]

Get a cache key for the given session id.

Parameters:
string$idSession id
Returns:
string Cache key

Definition at line 65 of file ObjectCacheSessionHandler.php.

References wfMemcKey().

Shutdown function.

See the comment inside ObjectCacheSessionHandler::install for rationale.

Definition at line 143 of file ObjectCacheSessionHandler.php.

Install a session handler for the current web request.

Definition at line 34 of file ObjectCacheSessionHandler.php.

References array().

Referenced by wfSetupSession().

static ObjectCacheSessionHandler::open ( save_path,
session_name 
) [static]

Callback when opening a session.

Parameters:
string$save_pathPath used to store session files, unused
string$session_nameSession name
Returns:
bool Success

Definition at line 76 of file ObjectCacheSessionHandler.php.

static ObjectCacheSessionHandler::read ( id) [static]

Callback when reading session data.

Parameters:
string$idSession id
Returns:
mixed Session data

Definition at line 96 of file ObjectCacheSessionHandler.php.

References getCache().

static ObjectCacheSessionHandler::write ( id,
data 
) [static]

Callback when writing session data.

Parameters:
string$idSession id
mixed$dataSession data
Returns:
bool Success

Definition at line 111 of file ObjectCacheSessionHandler.php.

References getCache(), and global.


The documentation for this class was generated from the following file: