Documentation

TestPool
in package
implements CacheItemPoolInterface Uses CacheTrait

Interfaces, Classes and Traits

CacheItemPoolInterface
CacheItemPoolInterface generates CacheItemInterface objects.

Table of Contents

clear()  : bool
Deletes all items in the pool.
commit()  : bool
Persists any deferred cache items.
delete()  : bool
{@inheritdoc}
deleteItem()  : bool
Removes the item from the pool.
deleteItems()  : bool
Removes multiple items from the pool.
get()  : mixed
{@inheritdoc}
getItem()  : CacheItemInterface
Returns a Cache Item representing the specified key.
getItems()  : array<string|int, mixed>|Traversable
Returns a traversable set of cache items.
hasItem()  : bool
Confirms if the cache contains specified cache item.
save()  : bool
Persists a cache item immediately.
saveDeferred()  : bool
Sets a cache item to be persisted later.
doGet()  : mixed

Methods

clear()

Deletes all items in the pool.

public clear() : bool
Return values
bool

commit()

Persists any deferred cache items.

public commit() : bool
Return values
bool

delete()

{@inheritdoc}

public delete(string $key) : bool
Parameters
$key : string
Return values
bool

deleteItem()

Removes the item from the pool.

public deleteItem(mixed $key) : bool
Parameters
$key : mixed
Return values
bool

deleteItems()

Removes multiple items from the pool.

public deleteItems([array<string|int, mixed> $keys = [] ]) : bool
Parameters
$keys : array<string|int, mixed> = []
Return values
bool

get()

{@inheritdoc}

public get(string $key, callable $callback[, float|null $beta = null ][, array<string|int, mixed>|null &$metadata = null ]) : mixed
Parameters
$key : string
$callback : callable
$beta : float|null = null
$metadata : array<string|int, mixed>|null = null
Return values
mixed

getItem()

Returns a Cache Item representing the specified key.

public getItem(mixed $key) : CacheItemInterface

This method must always return a CacheItemInterface object, even in case of a cache miss. It MUST NOT return null.

Parameters
$key : mixed
Return values
CacheItemInterface

getItems()

Returns a traversable set of cache items.

public getItems([array<string|int, mixed> $key = [] ]) : array<string|int, mixed>|Traversable
Parameters
$key : array<string|int, mixed> = []
Return values
array<string|int, mixed>|Traversable

hasItem()

Confirms if the cache contains specified cache item.

public hasItem(mixed $key) : bool

Note: This method MAY avoid retrieving the cached value for performance reasons. This could result in a race condition with CacheItemInterface::get(). To avoid such situation use CacheItemInterface::isHit() instead.

Parameters
$key : mixed
Return values
bool

Search results