\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
No private methods found
$sessionName
$prefetchId
$prefetchData
$newSessionId
$igbinaryEmptyData
$memcached
$ttl
$prefix
N/A

Properties

$sessionName

$sessionName : 

Type

$prefetchId

$prefetchId : 

Type

$prefetchData

$prefetchData : 

Type

$newSessionId

$newSessionId : 

Type

$igbinaryEmptyData

$igbinaryEmptyData : 

Type

$memcached

$memcached : 

Type

$ttl

$ttl : integer

Type

integer — Time to live in seconds

$prefix

$prefix : string

Type

string — Key prefix for shared environments

Methods

open()

open(  $savePath,   $sessionName) 

{@inheritdoc}

Parameters

$savePath
$sessionName

validateId()

validateId(  $sessionId) : boolean

Checks if a session identifier already exists or not.

Parameters

$sessionId

Returns

boolean

read()

read(  $sessionId) 

{@inheritdoc}

Parameters

$sessionId

write()

write(  $sessionId,   $data) 

{@inheritdoc}

Parameters

$sessionId
$data

destroy()

destroy(  $sessionId) 

{@inheritdoc}

Parameters

$sessionId

__construct()

__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

Throws

\InvalidArgumentException

When unsupported options are passed

close()

close() 

{@inheritdoc}

updateTimestamp()

updateTimestamp(  $sessionId,   $data) 

{@inheritdoc}

Parameters

$sessionId
$data

gc()

gc(  $maxlifetime) 

{@inheritdoc}

Parameters

$maxlifetime

doRead()

doRead(string  $sessionId) : string

Parameters

string $sessionId

Returns

string

doWrite()

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

Parameters

string $sessionId
string $data

Returns

boolean

doDestroy()

doDestroy(string  $sessionId) : boolean

Parameters

string $sessionId

Returns

boolean

getMemcached()

getMemcached() : \Memcached

Return a Memcached instance.

Returns

\Memcached