MemcachedHandler

Implements HandlerInterface

Memcached session storage handler

since

2.0.0

package

Joomla Framework

Methods

__construct

Constructor

__construct(\Memcached memcached, mixed||string|int options = []) : 
since

2.0.0

Arguments

memcached

MemcachedA Memcached instance

options

array<string|int, mixed>Associative array of options to configure the handler

Response

mixed

close

Close the session

close() : 
since

2.0.0

Response

boolTrue on success, false otherwise

destroy

Destroy a session

destroy( id) : 
since

2.0.0

Arguments

id

stringThe session ID being destroyed

Response

boolTrue on success, false otherwise

gc

Cleanup old sessions

gc( maxlifetime) : 
since

2.0.0

Arguments

maxlifetime

intSessions that have not updated for the last maxlifetime seconds will be removed

Response

boolTrue on success, false otherwise

isSupported

Test to see if the HandlerInterface is available

isSupported() : 
static
since

2.0.0

Response

boolTrue on success, false otherwise

open

Initialize session

open( save_path,  session_id) : 
since

2.0.0

Arguments

save_path

stringThe path where to store/retrieve the session

session_id

stringThe session id

Response

boolTrue on success, false otherwise

read

Read session data

read( session_id) : 
since

2.0.0

Arguments

session_id

stringThe session id to read data for

Response

stringThe session data

write

Write session data

write( session_id,  session_data) : 
since

2.0.0

Arguments

session_id

stringThe session id

session_data

stringThe encoded session data

Response

boolTrue on success, false otherwise

Properties

memcached

Memcached driver

since

2.0.0

Type(s)

Memcached

prefix

Session ID prefix to avoid naming conflicts

since

2.0.0

Type(s)

string

ttl

Time to live in seconds

since

2.0.0

Type(s)

int