Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
Description
Equivalent to \Psr\SimpleCache\CacheInterface::set() public function set(string $key, mixed $value, null|int|\DateInterval $ttl = null): bool;
Parameters
$keystring
The key of the item to store.
$valueSimplePie\Cache\array<mixed>
The value of the item to store, must be serializable.
$ttlnull|intoptional
The TTL value of this item. If no value is sent and the driver supports TTL then the library may set a default value for it or let the driver take care of that.Default: null
Signature, return type and hooks compared across 5 parsed releases.
6.9.7
Parameter $value retyped from array to SimplePie\Cache\array<mixed>.verified against source
About this page
Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/SimplePie/src/Cache/Psr16.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.