BumbleDocGen / Technical description of the project / Class map / SourceLocatorCacheItemPool
SourceLocatorCacheItemPool class:
namespace BumbleDocGen\Core\Cache;
final class SourceLocatorCacheItemPool implements \Psr\Cache\CacheItemPoolInterface
- clear - Deletes all items in the pool.
- commit - Persists any deferred cache items.
- deleteItem - Removes the item from the pool.
- deleteItems - Removes multiple items from the pool.
- getItem - Returns a Cache Item representing the specified key.
- getItems - Returns a traversable set of cache items.
- hasItem - Confirms if the cache contains specified cache item.
- save - Persists a cache item immediately.
- saveDeferred - Sets a cache item to be persisted later.
- # __construct | source code
public function __construct(\BumbleDocGen\Core\Configuration\Configuration $configuration);
Parameters:
Name | Type | Description |
---|---|---|
$configuration | \BumbleDocGen\Core\Configuration\Configuration | - |
Throws:
- # clear | source code
public function clear(): bool;
Deletes all items in the pool.
Parameters: not specified
Return value: bool
- # commit | source code
public function commit(): bool;
Persists any deferred cache items.
Parameters: not specified
Return value: bool
- # deleteItem | source code
public function deleteItem(string $key): bool;
Removes the item from the pool.
Parameters:
Name | Type | Description |
---|---|---|
$key | string | The key to delete. |
Return value: bool
Throws:
- \Psr\Cache\InvalidArgumentException - If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException MUST be thrown.
- # deleteItems | source code
public function deleteItems(array $keys): bool;
Removes multiple items from the pool.
Parameters:
Name | Type | Description |
---|---|---|
$keys | string[] | An array of keys that should be removed from the pool. |
Return value: bool
Throws:
- \Psr\Cache\InvalidArgumentException - If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException MUST be thrown.
- # getItem | source code
public function getItem(string $key): \Psr\Cache\CacheItemInterface;
Returns a Cache Item representing the specified key.
Parameters:
Name | Type | Description |
---|---|---|
$key | string | The key for which to return the corresponding Cache Item. |
Return value: \Psr\Cache\CacheItemInterface
Throws:
- \Psr\Cache\InvalidArgumentException - If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException MUST be thrown.
- # getItems | source code
public function getItems(array $keys = []): iterable;
Returns a traversable set of cache items.
Parameters:
Name | Type | Description |
---|---|---|
$keys | string[] | An indexed array of keys of items to retrieve. |
Return value: iterable
Throws:
- \Psr\Cache\InvalidArgumentException - If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException MUST be thrown.
- # hasItem | source code
public function hasItem(string $key): bool;
Confirms if the cache contains specified cache item.
Parameters:
Name | Type | Description |
---|---|---|
$key | string | The key for which to check existence. |
Return value: bool
Throws:
- \Psr\Cache\InvalidArgumentException - If the $key string is not a legal value a \Psr\Cache\InvalidArgumentException MUST be thrown.
- # save | source code
public function save(\Psr\Cache\CacheItemInterface $item): bool;
Persists a cache item immediately.
Parameters:
Name | Type | Description |
---|---|---|
$item | \Psr\Cache\CacheItemInterface | The cache item to save. |
Return value: bool
- # saveDeferred | source code
public function saveDeferred(\Psr\Cache\CacheItemInterface $item): bool;
Sets a cache item to be persisted later.
Parameters:
Name | Type | Description |
---|---|---|
$item | \Psr\Cache\CacheItemInterface | The cache item to save. |
Return value: bool