Skip to content

Latest commit

 

History

History
461 lines (343 loc) · 11.3 KB

SourceLocatorCacheItemPool.md

File metadata and controls

461 lines (343 loc) · 11.3 KB

BumbleDocGen / Technical description of the project / Class map / SourceLocatorCacheItemPool


namespace BumbleDocGen\Core\Cache;

final class SourceLocatorCacheItemPool implements \Psr\Cache\CacheItemPoolInterface

Initialization methods:

  1. __construct

Methods:

  1. clear - Deletes all items in the pool.
  2. commit - Persists any deferred cache items.
  3. deleteItem - Removes the item from the pool.
  4. deleteItems - Removes multiple items from the pool.
  5. getItem - Returns a Cache Item representing the specified key.
  6. getItems - Returns a traversable set of cache items.
  7. hasItem - Confirms if the cache contains specified cache item.
  8. save - Persists a cache item immediately.
  9. saveDeferred - Sets a cache item to be persisted later.

Method details:

public function __construct(\BumbleDocGen\Core\Configuration\Configuration $configuration);

Parameters:

Name Type Description
$configuration \BumbleDocGen\Core\Configuration\Configuration -

Throws:


public function clear(): bool;
Deletes all items in the pool.

Parameters: not specified

Return value: bool


public function commit(): bool;
Persists any deferred cache items.

Parameters: not specified

Return value: bool


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:


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:


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:


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:


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:


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


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