MemoryBackendFactory::get

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

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

Overrides CacheFactoryInterface::get

File

core/lib/Drupal/Core/Cache/MemoryBackendFactory.php, line 17

Class

MemoryBackendFactory

Namespace

Drupal\Core\Cache

Code

function get($bin) {
  if (!isset($this->bins[$bin])) {
    $this->bins[$bin] = new MemoryBackend($bin);
  }
  return $this->bins[$bin];
}
doc_Drupal
2016-10-29 09:25:49
Comments
Leave a Comment

Please login to continue.