Interface for cache engines that defines methods outside of the PSR16 interface that are used by Cache.
Internally Cache uses this interface when calling engine methods.
Write data for key into a cache engine if it doesn't exist already.
Clear all values belonging to the named group.
Decrement a number under the key and return decremented value
Increment a number under the key and return incremented value
add(string $key, mixed $value): bool
Write data for key into a cache engine if it doesn't exist already.
string $key Identifier for the data.
mixed $value Data to be cached - anything except a resource.
boolclearGroup(string $group): bool
Clear all values belonging to the named group.
Each implementation needs to decide whether actually delete the keys or just augment a group generation value to achieve the same result.
string $group name of the group to be cleared
booldecrement(string $key, int $offset = 1): int|false
Decrement a number under the key and return decremented value
string $key Identifier for the data
int $offset optional How much to subtract
int|falseincrement(string $key, int $offset = 1): int|false
Increment a number under the key and return incremented value
string $key Identifier for the data
int $offset optional How much to add
int|false
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.4/interface-Cake.Cache.CacheEngineInterface.html