MemcachedSessionHandler

class MemcachedSessionHandler extends AbstractSessionHandler

Memcached based session storage handler based on the Memcached class provided by the PHP memcached extension.

Methods

open($savePath, $sessionName)

{@inheritdoc}

from AbstractSessionHandler
validateId($sessionId)

{@inheritdoc}

from AbstractSessionHandler
read($sessionId)

{@inheritdoc}

from AbstractSessionHandler
write($sessionId, $data)

{@inheritdoc}

from AbstractSessionHandler
destroy($sessionId)

{@inheritdoc}

from AbstractSessionHandler
__construct(Memcached $memcached, array $options = array())

Constructor.

close()

{@inheritdoc}

updateTimestamp($sessionId, $data)

{@inheritdoc}

gc($maxlifetime)

{@inheritdoc}

Details

open($savePath, $sessionName)

{@inheritdoc}

Parameters

$savePath
$sessionName

validateId($sessionId)

{@inheritdoc}

Parameters

$sessionId

read($sessionId)

{@inheritdoc}

Parameters

$sessionId

write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId

__construct(Memcached $memcached, array $options = array())

Constructor.

List of available options: * prefix: The prefix to use for the memcached keys in order to avoid collision * expiretime: The time to live in seconds.

Parameters

Memcached $memcached A \Memcached instance
array $options An associative array of Memcached options

Exceptions

InvalidArgumentException When unsupported options are passed

close()

{@inheritdoc}

updateTimestamp($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

gc($maxlifetime)

{@inheritdoc}

Parameters

$maxlifetime