class ChainedFastBackendFactory implements CacheFactoryInterface (View source)

Defines the chained fast cache backend factory.

Traits

ContainerAwareTrait

Properties

protected string $consistentServiceName

The service name of the consistent backend factory.

protected string $fastServiceName

The service name of the fast backend factory.

Methods

__construct(Settings $settings = NULL, string|null $consistent_service_name = NULL, string|null $fast_service_name = NULL)

Constructs ChainedFastBackendFactory object.

get(string $bin)

Instantiates a chained, fast cache backend class for a given cache bin.

Details

__construct(Settings $settings = NULL, string|null $consistent_service_name = NULL, string|null $fast_service_name = NULL)

Constructs ChainedFastBackendFactory object.

Parameters

Settings $settings

(optional) The settings object.

string|null $consistent_service_name

(optional) The service name of the consistent backend factory. Defaults to:

  • $settings->get('cache')['default'] (if specified)
  • 'cache.backend.database' (if the above isn't specified)
string|null $fast_service_name

(optional) The service name of the fast backend factory. Defaults to:

  • 'cache.backend.apcu' (if the PHP process has APCu enabled)
  • NULL (if the PHP process doesn't have APCu enabled)

CacheBackendInterface get(string $bin)

Instantiates a chained, fast cache backend class for a given cache bin.

Parameters

string $bin

The cache bin for which a cache backend object should be returned.

Return Value

CacheBackendInterface

The cache backend object associated with the specified bin.