class CacheBasedSessionHandler implements SessionHandlerInterface (View source)

Properties

protected Repository $cache

The cache repository instance.

protected int $minutes

The number of minutes to store the data in the cache.

Methods

void
__construct(Repository $cache, int $minutes)

Create a new cache driven handler instance.

bool
open($savePath, $sessionName)

{@inheritdoc}

bool
close()

{@inheritdoc}

string|false
read($sessionId)

{@inheritdoc}

bool
write($sessionId, $data)

{@inheritdoc}

bool
destroy($sessionId)

{@inheritdoc}

int|false
gc($lifetime)

{@inheritdoc}

getCache()

Get the underlying cache repository.

Details

void __construct(Repository $cache, int $minutes)

Create a new cache driven handler instance.

Parameters

Repository $cache
int $minutes

Return Value

void

bool open($savePath, $sessionName)

{@inheritdoc}

Parameters

$savePath
$sessionName

Return Value

bool

bool close()

{@inheritdoc}

Return Value

bool

string|false read($sessionId)

{@inheritdoc}

Parameters

$sessionId

Return Value

string|false

bool write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

Return Value

bool

bool destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId

Return Value

bool

int|false gc($lifetime)

{@inheritdoc}

Parameters

$lifetime

Return Value

int|false

Repository getCache()

Get the underlying cache repository.

Return Value

Repository