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 = [])

Constructor.

open($savePath, $sessionName)

{@inheritdoc}

close()

{@inheritdoc}

read($sessionId)

{@inheritdoc}

write($sessionId, $data)

{@inheritdoc}

destroy($sessionId)

{@inheritdoc}

gc($maxlifetime)

{@inheritdoc}

Memcache
getMemcache()

Return a Memcache instance.

Details

at line 47
__construct(Memcache $memcache, array $options = [])

Constructor.

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

at line 61
open($savePath, $sessionName)

{@inheritdoc}

Parameters

$savePath
$sessionName

at line 69
close()

{@inheritdoc}

at line 77
read($sessionId)

{@inheritdoc}

Parameters

$sessionId

at line 85
write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

at line 93
destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId

at line 103
gc($maxlifetime)

{@inheritdoc}

Parameters

$maxlifetime

at line 114
protected Memcache getMemcache()

Return a Memcache instance.

Return Value

Memcache