MemcacheSessionHandler deprecated

class MemcacheSessionHandler implements SessionHandlerInterface

deprecated

since version 3.4, to be removed in 4.0. Use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler instead.

Methods

__construct(Memcache $memcache, array $options = array())

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

open($savePath, $sessionName)

{@inheritdoc}

close()

{@inheritdoc}

read($sessionId)

{@inheritdoc}

write($sessionId, $data)

{@inheritdoc}

destroy($sessionId)

{@inheritdoc}

gc($maxlifetime)

{@inheritdoc}

Details

__construct(Memcache $memcache, array $options = array())

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

Parameters

Memcache $memcache A \Memcache instance
array $options An associative array of Memcache options

Exceptions

InvalidArgumentException When unsupported options are passed

open($savePath, $sessionName)

{@inheritdoc}

Parameters

$savePath
$sessionName

close()

{@inheritdoc}

read($sessionId)

{@inheritdoc}

Parameters

$sessionId

write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId

gc($maxlifetime)

{@inheritdoc}

Parameters

$maxlifetime