function MemoryCacheFactory::get

Same name in other branches
  1. 10 core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheFactory.php \Drupal\Core\Cache\MemoryCache\MemoryCacheFactory::get()

Overrides CacheFactoryInterface::get

File

core/lib/Drupal/Core/Cache/MemoryCache/MemoryCacheFactory.php, line 29

Class

MemoryCacheFactory

Namespace

Drupal\Core\Cache\MemoryCache

Code

public function get($bin) {
    if (!isset($this->bins[$bin])) {
        $this->bins[$bin] = new MemoryCache($this->time);
    }
    return $this->bins[$bin];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.