public static function CacheFactory::getBackends

Returns a list of cache backends for this site.

Return value

array An associative array with cache bins as keys, and backend class names as value.

3 calls to CacheFactory::getBackends()
CacheFactory::get in drupal/core/lib/Drupal/Core/Cache/CacheFactory.php
Instantiates a cache backend class for a given cache bin.
cache_delete_tags in drupal/core/includes/cache.inc
Deletes items from all bins with any of the specified tags.
cache_invalidate_tags in drupal/core/includes/cache.inc
Marks cache items from all bins with any of the specified tags as invalid.

File

drupal/core/lib/Drupal/Core/Cache/CacheFactory.php, line 45
Contains Drupal\Core\Cache\CacheFactory.

Class

CacheFactory
Defines the cache backend factory.

Namespace

Drupal\Core\Cache

Code

public static function getBackends() {

  // @todo Improve how cache backend classes are defined. Cannot be
  //   configuration, since e.g. the CachedStorage config storage controller
  //   requires the definition in its constructor already.
  global $conf;
  $cache_backends = isset($conf['cache_classes']) ? $conf['cache_classes'] : array();

  // Ensure there is a default 'cache' bin definition.
  $cache_backends += array(
    'cache' => 'Drupal\\Core\\Cache\\DatabaseBackend',
  );
  return $cache_backends;
}