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}

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

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.