Skip to content

ItemPool

  • Full name: \Qubus\Cache\Psr6\ItemPool
  • This class is marked as final and can't be subclassed
  • This class implements: \Psr\Cache\CacheItemPoolInterface
  • This class is a Final class

Constants

Constant Visibility Type Value
CACHE_FLAG public "@psr6_"

Properties

deferredItems

protected \Psr\Cache\CacheItemInterface[] $deferredItems

adapter

private \Qubus\Cache\Adapter\CacheAdapter $adapter

ttl

private int|null|\DateInterval $ttl

namespace

private ?string $namespace

autoCommitCount

private ?int $autoCommitCount

Methods

__construct

public __construct(\Qubus\Cache\Adapter\CacheAdapter $adapter, int|null|\DateInterval $ttl = null, ?string $namespace = 'default', ?int $autoCommitCount = null): mixed

Parameters:

Parameter Type Description
$adapter \Qubus\Cache\Adapter\CacheAdapter
$ttl int|null|\DateInterval
$namespace ?string
$autoCommitCount ?int

__destruct

Commit any pending deferred items.

public __destruct(): mixed

getItem

{@inheritdoc}

public getItem(string $key): \Psr\Cache\CacheItemInterface

Parameters:

Parameter Type Description
$key string

getItems

{@inheritdoc}

public getItems(array $keys = []): iterable

Parameters:

Parameter Type Description
$keys array

hasItem

{@inheritdoc}

public hasItem(string $key): bool

Parameters:

Parameter Type Description
$key string

clear

{@inheritdoc}

public clear(): bool

deleteItem

{@inheritdoc}

public deleteItem(string $key): bool

Parameters:

Parameter Type Description
$key string

deleteItems

{@inheritdoc}

public deleteItems(array $keys): bool

Parameters:

Parameter Type Description
$keys array

save

{@inheritdoc}

public save(\Psr\Cache\CacheItemInterface $item): bool

Parameters:

Parameter Type Description
$item \Psr\Cache\CacheItemInterface

Throws:


saveDeferred

{@inheritdoc}

public saveDeferred(\Psr\Cache\CacheItemInterface $item): bool

Parameters:

Parameter Type Description
$item \Psr\Cache\CacheItemInterface

Throws:


commit

{@inheritdoc}

public commit(): bool

getTtl

protected getTtl(int|null|\DateInterval $ttl): ?int

Parameters:

Parameter Type Description
$ttl int|null|\DateInterval

Inherited methods

reservedKeyCharacters

Reserved key characters that should not be used in a cache key.

final public reservedKeyCharacters(): string
  • This method is final.

validateKey

Validates cache key.

protected validateKey(string $key): string

Parameters:

Parameter Type Description
$key string

Throws:


isHashed

Checks if key is hashed.

protected isHashed(string $key): bool

Parameters:

Parameter Type Description
$key string

prefix

Affixes a prefix to the

protected prefix(string $key): string

Parameters:

Parameter Type Description
$key string

validateKeys

Validates an array of keys.

protected validateKeys(array $keys): void

Parameters:

Parameter Type Description
$keys array

Throws:



Automatically generated on 2025-10-13