public static function Drupal::cache

Returns the requested cache bin.

Parameters

string $bin: (optional) The cache bin for which the cache object should be returned, defaults to 'cache'.

Return value

\Drupal\Core\Cache\CacheBackendInterface The cache object associated with the specified bin.

1 call to Drupal::cache()
cache in drupal/core/includes/cache.inc
Instantiates and statically caches the correct class for a cache bin.

File

drupal/core/lib/Drupal.php, line 180
Contains Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function cache($bin = 'cache') {
  return static::$container
    ->get('cache.' . $bin);
}