interface EnhancedCacheItemPoolInterface implements CacheItemPoolInterface (View source)

Constants

CACHE_SUCCESS

CACHE_ERROR

Methods

string
getId()

Returns the internal pool's id

int
getState()

Returns the current state

string|null
getStateMessage()

Returns the current state

DateTimeInterface|null
getStateTime()

Returns the time when the state was determined

setState($state, $message = null)

Put provider in error state

bool
test()

Test the pool

string
getNamespace()

Get current namespace

string|null
setNamespace(string $namespace)

Set current namespace

string|null
clearNamespace()

Chear the whole (current) namespace

EnhancedCacheItemPoolStats
getStats()

Get provider statistics

Details

string getId()

Returns the internal pool's id

Return Value

string

int getState()

Returns the current state

Return Value

int 0 if no error.

string|null getStateMessage()

Returns the current state

Return Value

string|null Last error message (if any).

DateTimeInterface|null getStateTime()

Returns the time when the state was determined

Return Value

DateTimeInterface|null

EnhancedCacheItemPoolInterface setState($state, $message = null)

Put provider in error state

Parameters

$state
$message

Return Value

EnhancedCacheItemPoolInterface The invoked object.

bool test()

Test the pool

Test should be used to ensure the status flag is setted correctly. If test passes, then status should be CACHE_SUCCESS, otherwise it should correspond to CACHE_ERROR

Return Value

bool

string getNamespace()

Get current namespace

Return Value

string

string|null setNamespace(string $namespace)

Set current namespace

Parameters

string $namespace Namespace where $key resides

Return Value

string|null

string|null clearNamespace()

Chear the whole (current) namespace

Return Value

string|null

EnhancedCacheItemPoolStats getStats()

Get provider statistics

Return Value

EnhancedCacheItemPoolStats