TraceableTagAwareAdapter
extends TraceableAdapter
in package
implements
TagAwareAdapterInterface, TagAwareCacheInterface
An adapter that collects data about all cache calls.
Tags
Interfaces, Classes and Traits
- TagAwareAdapterInterface
- Interface for invalidating cached items using tags.
- TagAwareCacheInterface
- Allows invalidating cached items using tags.
Table of Contents
- $pool : mixed
- $calls : mixed
- __construct() : mixed
- clear() : bool
- Deletes all items in the pool.
- clearCalls() : mixed
- commit() : bool
- {@inheritdoc}
- delete() : bool
- Removes an item from the pool.
- deleteItem() : bool
- {@inheritdoc}
- deleteItems() : bool
- {@inheritdoc}
- get() : mixed
- Fetches a value from the pool or computes it if not found.
- getCalls() : mixed
- getItem() : CacheItem
- Returns a Cache Item representing the specified key.
- getItems() : Traversable<string, CacheItem>
- Returns a traversable set of cache items.
- hasItem() : bool
- {@inheritdoc}
- invalidateTags() : bool
- Invalidates cached items using tags.
- prune() : bool
- reset() : mixed
- {@inheritdoc}
- save() : bool
- {@inheritdoc}
- saveDeferred() : bool
- {@inheritdoc}
- start() : mixed
Properties
$pool
protected
mixed
$pool
$calls
private
mixed
$calls
= []
Methods
__construct()
public
__construct(TagAwareAdapterInterface $pool) : mixed
Parameters
- $pool : TagAwareAdapterInterface
Return values
mixed —clear()
Deletes all items in the pool.
public
clear([string $prefix = '' ]) : bool
Parameters
- $prefix : string = ''
Return values
bool —clearCalls()
public
clearCalls() : mixed
Return values
mixed —commit()
{@inheritdoc}
public
commit() : bool
Return values
bool —delete()
Removes an item from the pool.
public
delete(string $key) : bool
Parameters
- $key : string
-
The key to delete
Return values
bool —True if the item was successfully removed, false if there was any error
deleteItem()
{@inheritdoc}
public
deleteItem(mixed $key) : bool
Parameters
- $key : mixed
Return values
bool —deleteItems()
{@inheritdoc}
public
deleteItems(array<string|int, mixed> $keys) : bool
Parameters
- $keys : array<string|int, mixed>
Return values
bool —get()
Fetches a value from the pool or computes it if not found.
public
get(string $key, callable $callback[, float|null $beta = null ][, array<string|int, mixed>|null &$metadata = null ]) : mixed
Parameters
- $key : string
-
The key of the item to retrieve from the cache
- $callback : callable
-
Should return the computed value for the given key/item
- $beta : float|null = null
-
A float that, as it grows, controls the likeliness of triggering early expiration. 0 disables it, INF forces immediate expiration. The default (or providing null) is implementation dependent but should typically be 1.0, which should provide optimal stampede protection. See https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration
- $metadata : array<string|int, mixed>|null = null
-
The metadata of the cached item ItemInterface::getMetadata()
Return values
mixed —getCalls()
public
getCalls() : mixed
Return values
mixed —getItem()
Returns a Cache Item representing the specified key.
public
getItem(mixed $key) : CacheItem
Parameters
- $key : mixed
Return values
CacheItem —getItems()
Returns a traversable set of cache items.
public
getItems([array<string|int, mixed> $keys = [] ]) : Traversable<string, CacheItem>
Parameters
- $keys : array<string|int, mixed> = []
Return values
Traversable<string, CacheItem> —hasItem()
{@inheritdoc}
public
hasItem(mixed $key) : bool
Parameters
- $key : mixed
Return values
bool —invalidateTags()
Invalidates cached items using tags.
public
invalidateTags(array<string|int, mixed> $tags) : bool
Parameters
- $tags : array<string|int, mixed>
-
An array of tags to invalidate
Return values
bool —prune()
public
prune() : bool
Return values
bool —reset()
{@inheritdoc}
public
reset() : mixed
Return values
mixed —save()
{@inheritdoc}
public
save(CacheItemInterface $item) : bool
Parameters
- $item : CacheItemInterface
Return values
bool —saveDeferred()
{@inheritdoc}
public
saveDeferred(CacheItemInterface $item) : bool
Parameters
- $item : CacheItemInterface
Return values
bool —start()
protected
start(string $name) : mixed
Parameters
- $name : string