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
bool
open($savePath, $sessionName)
{@inheritdoc}
bool
close()
{@inheritdoc}
string
read($sessionId)
{@inheritdoc}
bool
write($sessionId, $data)
{@inheritdoc}
bool
destroy($sessionId)
{@inheritdoc}
int
gc($lifetime)
{@inheritdoc}
getCache()
Get the underlying cache repository.
Details
void
__construct(Repository $cache, int $minutes)
Create a new cache driven handler instance.
bool
open($savePath, $sessionName)
{@inheritdoc}
bool
close()
{@inheritdoc}
string
read($sessionId)
{@inheritdoc}
bool
write($sessionId, $data)
{@inheritdoc}
bool
destroy($sessionId)
{@inheritdoc}
int
gc($lifetime)
{@inheritdoc}
Repository
getCache()
Get the underlying cache 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.