CacheBasedSessionHandler

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.

open($savePath, $sessionName)

{@inheritDoc}

close()

{@inheritDoc}

read($sessionId)

{@inheritDoc}

write($sessionId, $data)

{@inheritDoc}

destroy($sessionId)

{@inheritDoc}

gc($lifetime)

{@inheritDoc}

Repository 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

open($savePath, $sessionName)

{@inheritDoc}

Parameters

$savePath
$sessionName

close()

{@inheritDoc}

read($sessionId)

{@inheritDoc}

Parameters

$sessionId

write($sessionId, $data)

{@inheritDoc}

Parameters

$sessionId
$data

destroy($sessionId)

{@inheritDoc}

Parameters

$sessionId

gc($lifetime)

{@inheritDoc}

Parameters

$lifetime

Repository getCache()

Get the underlying cache repository.

Return Value

Repository

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Session/CacheBasedSessionHandler.html