|
| clear () |
| Wipes clean the entire cache's keys.
|
|
| delete (string $key) |
| Delete an item from the cache by its unique key.
|
|
| deleteMultiple (iterable $keys) |
| Deletes multiple cache items in a single operation.
|
|
| get (string $key, mixed $default=null) |
|
| getMultiple (iterable $keys, mixed $default=null) |
| Obtains multiple cache items by their unique keys.
|
|
| has (string $key) |
| Determines whether an item is present in the cache.
|
|
| set (string $key, mixed $value, null|int|DateInterval $ttl=null) |
| Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
|
|
| setMultiple (iterable $values, null|int|DateInterval $ttl=null) |
| Persists a set of key => value pairs in the cache, with an optional TTL.
|
|
◆ clear()
Psr\SimpleCache\CacheInterface::clear |
( |
| ) |
|
◆ delete()
Psr\SimpleCache\CacheInterface::delete |
( |
string | $key | ) |
|
Delete an item from the cache by its unique key.
- Parameters
-
string | $key | The unique cache key of the item to delete. |
- Return values
-
bool | True if the item was successfully removed. False if there was an error. |
- Exceptions
-
Implemented in PhpOffice\PhpSpreadsheet\Collection\Memory\SimpleCache3.
◆ deleteMultiple()
Psr\SimpleCache\CacheInterface::deleteMultiple |
( |
iterable | $keys | ) |
|
Deletes multiple cache items in a single operation.
- Parameters
-
iterable<string> | $keys A list of string-based keys to be deleted. |
- Return values
-
bool | True if the items were successfully removed. False if there was an error. |
- Exceptions
-
Implemented in PhpOffice\PhpSpreadsheet\Collection\Memory\SimpleCache3.
◆ getMultiple()
Psr\SimpleCache\CacheInterface::getMultiple |
( |
iterable | $keys, |
|
|
mixed | $default = null ) |
Obtains multiple cache items by their unique keys.
- Parameters
-
| iterable<string> | $keys A list of keys that can be obtained in a single operation. |
mixed | $default | Default value to return for keys that do not exist. |
- Return values
-
iterable<string,mixed> | A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. |
- Exceptions
-
Implemented in PhpOffice\PhpSpreadsheet\Collection\Memory\SimpleCache3.
◆ has()
Psr\SimpleCache\CacheInterface::has |
( |
string | $key | ) |
|
Determines whether an item is present in the cache.
NOTE: It is recommended that has() is only to be used for cache warming type purposes and not to be used within your live applications operations for get/set, as this method is subject to a race condition where your has() will return true and immediately after, another script can remove it making the state of your app out of date.
- Parameters
-
string | $key | The cache item key. |
- Return values
-
- Exceptions
-
Implemented in PhpOffice\PhpSpreadsheet\Collection\Memory\SimpleCache3.
◆ set()
Psr\SimpleCache\CacheInterface::set |
( |
string | $key, |
|
|
mixed | $value, |
|
|
null|int|DateInterval | $ttl = null ) |
Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
- Parameters
-
string | $key | The key of the item to store. |
mixed | $value | The value of the item to store, must be serializable. |
null | int | DateInterval | $ttl | Optional. 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. |
- Return values
-
bool | True on success and false on failure. |
- Exceptions
-
Implemented in PhpOffice\PhpSpreadsheet\Collection\Memory\SimpleCache3.
◆ setMultiple()
Psr\SimpleCache\CacheInterface::setMultiple |
( |
iterable | $values, |
|
|
null|int|DateInterval | $ttl = null ) |
Persists a set of key => value pairs in the cache, with an optional TTL.
- Parameters
-
iterable | $values | A list of key => value pairs for a multiple-set operation. |
null | int | DateInterval | $ttl | Optional. 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. |
- Return values
-
bool | True on success and false on failure. |
- Exceptions
-
Implemented in PhpOffice\PhpSpreadsheet\Collection\Memory\SimpleCache3.
The documentation for this interface was generated from the following file:
- lib/psr/simple-cache/src/CacheInterface.php