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

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

{@inheritdoc}

Parameters

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

bool delete(string $key)

{@inheritdoc}

Parameters

string $key

Return Value

bool

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