function CacheItemInterface::expiresAfter
Sets the expiration time for this cache item.
Parameters
int|\DateInterval|null $time: The period of time from the present after which the item MUST be considered expired. An integer parameter is understood to be the time in seconds until expiration. If null is passed explicitly, a default value MAY be used. If none is set, the value should be stored permanently or for as long as the implementation allows.
Return value
static The called object.
File
-
vendor/
psr/ cache/ src/ CacheItemInterface.php, line 104
Class
- CacheItemInterface
- CacheItemInterface defines an interface for interacting with objects inside a cache.
Namespace
Psr\CacheCode
public function expiresAfter(int|\DateInterval|null $time) : static;