CacheFactory
class CacheFactory implements CacheFactoryInterface, ContainerAwareInterface (View source)
Traits
ContainerAwareTrait
Properties
| protected Settings | $settings | The site settings. |
|
| protected array | $defaultBinBackends | A map of cache bin to default cache backend service name. |
Methods
get(string $bin)
Instantiates a cache backend class for a given cache bin.
Details
__construct(Settings $settings, array $default_bin_backends = [])
Constructs CacheFactory object.
CacheBackendInterface
get(string $bin)
Instantiates a cache backend class for a given cache bin.
By default, this returns an instance of the Drupal\Core\Cache\DatabaseBackend class.
Classes implementing Drupal\Core\Cache\CacheBackendInterface can register themselves both as a default implementation and for specific bins.