\Symfony\Component\HttpFoundation\Session\Storage\HandlerMemcachedSessionHandler

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

Summary

Methods
Properties
Constants
open()
validateId()
read()
write()
destroy()
__construct()
close()
updateTimestamp()
gc()
No public properties found
No constants found
doRead()
doWrite()
doDestroy()
getMemcached()
No protected properties found
N/A
getCompatibleTtl()
$sessionName
$prefetchId
$prefetchData
$newSessionId
$igbinaryEmptyData
$memcached
$ttl
$prefix
N/A

Properties

$sessionName

$sessionName

$prefetchId

$prefetchId

$prefetchData

$prefetchData

$newSessionId

$newSessionId

$igbinaryEmptyData

$igbinaryEmptyData

$memcached

$memcached

$ttl

$ttl : int

Type

int — Time to live in seconds

$prefix

$prefix : string

Type

string — Key prefix for shared environments

Methods

open()

open(mixed  $savePath, mixed  $sessionName) : bool

Parameters

mixed $savePath
mixed $sessionName

Returns

bool —

validateId()

validateId(mixed  $sessionId) : bool

Parameters

mixed $sessionId

Returns

bool —

read()

read(mixed  $sessionId) : string

Parameters

mixed $sessionId

Returns

string —

write()

write(mixed  $sessionId, mixed  $data) : bool

Parameters

mixed $sessionId
mixed $data

Returns

bool —

destroy()

destroy(mixed  $sessionId) : bool

Parameters

mixed $sessionId

Returns

bool —

__construct()

__construct(\Memcached  $memcached, array  $options = []) : mixed

Constructor.

List of available options:

  • prefix: The prefix to use for the memcached keys in order to avoid collision
  • ttl: The time to live in seconds.

Parameters

\Memcached $memcached
array $options

Throws

\InvalidArgumentException

When unsupported options are passed

Returns

mixed —

close()

close() : bool

Returns

bool —

updateTimestamp()

updateTimestamp(mixed  $sessionId, mixed  $data) : bool

Parameters

mixed $sessionId
mixed $data

Returns

bool —

gc()

gc(mixed  $maxlifetime) : int|false

Parameters

mixed $maxlifetime

Returns

int|false —

doRead()

doRead(string  $sessionId) : string

Parameters

string $sessionId

Returns

string —

doWrite()

doWrite(string  $sessionId, string  $data) : bool

Parameters

string $sessionId
string $data

Returns

bool —

doDestroy()

doDestroy(string  $sessionId) : bool

Parameters

string $sessionId

Returns

bool —

getMemcached()

getMemcached() : \Memcached

Return a Memcached instance.

Returns

\Memcached —

getCompatibleTtl()

getCompatibleTtl() : int

Returns

int —