Documentation

SessionCache extends AbstractAdapter

Table of Contents

$ttl  : int
Time to live.
__construct()  : mixed
__construct.
deleteItem()  : self
Delete the cache.
destroy()  : self
Remove all caches.
getItem()  : mixed
Get value form the cache.
getItemTtl()  : int|false
Get the time-to-live for an item in cache.
getTtl()  : int
Get the time-to-live for cache.
hasItem()  : bool
Determine if cache exists.
saveItem()  : self
Save an item to cache.
setTtl()  : self
Set the ttl.

Properties

Methods

__construct()

__construct.

public __construct(int $ttl) : mixed
Parameters
$ttl : int

time to live

Tags
since
1.0.0
Return values
mixed

deleteItem()

Delete the cache.

public deleteItem(mixed $key) : self
Parameters
$key : mixed
Tags
since
1.0.0
Return values
self

destroy()

Remove all caches.

public destroy() : self
Tags
since
1.0.0
Return values
self

getItem()

Get value form the cache.

public getItem(string $key) : mixed
Parameters
$key : string
Tags
since
1.0.0
Return values
mixed

getItemTtl()

Get the time-to-live for an item in cache.

public getItemTtl(string $key) : int|false
Parameters
$key : string
Tags
since
1.0.0
Return values
int|false

getTtl()

Get the time-to-live for cache.

public getTtl() : int
Tags
since
1.0.0
Return values
int

hasItem()

Determine if cache exists.

public hasItem(string $key) : bool
Parameters
$key : string
Tags
since
1.0.0
Return values
bool

saveItem()

Save an item to cache.

public saveItem(string $key, mixed $value[, int $ttl = null ]) : self
Parameters
$key : string
$value : mixed
$ttl : int = null
Tags
since
1.0.0
Return values
self

setTtl()

Set the ttl.

public setTtl(int $ttl) : self
Parameters
$ttl : int

time to live

Tags
since
1.0.0
Return values
self

Search results