ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
This is the default implementation for in-memory cell collection. More...
Public Member Functions | |
clear () | |
Wipes clean the entire cache's keys. More... | |
delete ($key) | |
Delete an item from the cache by its unique key. More... | |
deleteMultiple ($keys) | |
Deletes multiple cache items in a single operation. More... | |
get ($key, $default=null) | |
Fetches a value from the cache. More... | |
getMultiple ($keys, $default=null) | |
Obtains multiple cache items by their unique keys. More... | |
has ($key) | |
Determines whether an item is present in the cache. More... | |
set ($key, $value, $ttl=null) | |
Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time. More... | |
setMultiple ($values, $ttl=null) | |
Persists a set of key => value pairs in the cache, with an optional TTL. More... | |
Private Attributes | |
$cache = [] | |
This is the default implementation for in-memory cell collection.
Alternatives implementation should leverage off-memory, non-volatile storage to reduce overall memory usage.
Definition at line 13 of file Memory.php.
PhpOffice\PhpSpreadsheet\Collection\Memory::clear | ( | ) |
Wipes clean the entire cache's keys.
Implements Psr\SimpleCache\CacheInterface.
Definition at line 17 of file Memory.php.
PhpOffice\PhpSpreadsheet\Collection\Memory::delete | ( | $key | ) |
Delete an item from the cache by its unique key.
string | $key | The unique cache key of the item to delete. |
Implements Psr\SimpleCache\CacheInterface.
Definition at line 24 of file Memory.php.
References $key.
PhpOffice\PhpSpreadsheet\Collection\Memory::deleteMultiple | ( | $keys | ) |
Deletes multiple cache items in a single operation.
iterable | $keys | A list of string-based keys to be deleted. |
Implements Psr\SimpleCache\CacheInterface.
Definition at line 31 of file Memory.php.
PhpOffice\PhpSpreadsheet\Collection\Memory::get | ( | $key, | |
$default = null |
|||
) |
Fetches a value from the cache.
string | $key | The unique key of this item in the cache. |
mixed | $default | Default value to return if the key does not exist. |
Implements Psr\SimpleCache\CacheInterface.
Definition at line 40 of file Memory.php.
References $default, $key, and PhpOffice\PhpSpreadsheet\Collection\Memory\has().
PhpOffice\PhpSpreadsheet\Collection\Memory::getMultiple | ( | $keys, | |
$default = null |
|||
) |
Obtains multiple cache items by their unique keys.
iterable | $keys | A list of keys that can obtained in a single operation. |
mixed | $default | Default value to return for keys that do not exist. |
Implements Psr\SimpleCache\CacheInterface.
Definition at line 49 of file Memory.php.
References $default, $key, $keys, and $results.
PhpOffice\PhpSpreadsheet\Collection\Memory::has | ( | $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.
string | $key | The cache item key. |
Implements Psr\SimpleCache\CacheInterface.
Definition at line 59 of file Memory.php.
References $key.
Referenced by PhpOffice\PhpSpreadsheet\Collection\Memory\get().
PhpOffice\PhpSpreadsheet\Collection\Memory::set | ( | $key, | |
$value, | |||
$ttl = null |
|||
) |
Persists data in the cache, uniquely referenced by a key with an optional expiration TTL time.
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. |
Implements Psr\SimpleCache\CacheInterface.
Definition at line 64 of file Memory.php.
References $key.
PhpOffice\PhpSpreadsheet\Collection\Memory::setMultiple | ( | $values, | |
$ttl = null |
|||
) |
Persists a set of key => value pairs in the cache, with an optional TTL.
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. |
Implements Psr\SimpleCache\CacheInterface.
Definition at line 71 of file Memory.php.
|
private |
Definition at line 15 of file Memory.php.