class UpdateCacheBackendFactory implements CacheFactoryInterface (View source)

Cache factory implementation for use during Drupal database updates.

Decorates the regular runtime cache_factory service so that caches use \Drupal\Core\Update\UpdateBackend.

Properties

protected CacheFactoryInterface $cacheFactory

The regular runtime cache_factory service.

protected UpdateBackend[] $bins

Instantiated update cache bins.

Methods

__construct(CacheFactoryInterface $cache_factory)

UpdateCacheBackendFactory constructor.

get(string $bin)

Gets a cache backend class for a given cache bin.

Details

__construct(CacheFactoryInterface $cache_factory)

UpdateCacheBackendFactory constructor.

Parameters

CacheFactoryInterface $cache_factory

The regular runtime cache_factory service.

CacheBackendInterface get(string $bin)

Gets a 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.