Skip to content

CacheInterface

Framework-facing cache interface; extends PSR-16 for flexibility.

interface CacheInterface extends CacheInterface

ImplementsCacheInterface
Implemented byRecordingCache, StubbedCache
SourceCache/CacheInterface.php

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
clear()CacheInterfaceWipes clean the entire cache’s keys.
delete()CacheInterfaceDelete an item from the cache by its unique key.
deleteMultiple()CacheInterfaceDeletes multiple cache items in a single operation.
get()CacheInterfaceFetches a value from the cache.
getMultiple()CacheInterfaceObtains multiple cache items by their unique keys.
has()CacheInterfaceDetermines whether an item is present in the cache.
set()CacheInterfacePersists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
setMultiple()CacheInterfacePersists a set of key => value pairs in the cache, with an optional TTL.