trait ContractsTrait

Traits

An implementation of CacheInterface for PSR-6 CacheItemPoolInterface classes.

Methods

get(string $key, callable $callback, float $beta = null, array $metadata = null)

{@inheritdoc}

bool
delete(string $key)

{@inheritdoc}

callable
setCallbackWrapper(callable|null $callbackWrapper)

Wraps the callback passed to ->get() in a callable.

Details

in CacheTrait at line 27
get(string $key, callable $callback, float $beta = null, array $metadata = null)

{@inheritdoc}

Parameters

string $key
callable $callback
float $beta
array $metadata

in CacheTrait at line 35
bool delete(string $key)

{@inheritdoc}

Parameters

string $key

Return Value

bool

at line 40
callable setCallbackWrapper(callable|null $callbackWrapper)

Wraps the callback passed to ->get() in a callable.

Parameters

callable|null $callbackWrapper

Return Value

callable the previous callback wrapper