function MemoryBackendFactory::get

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Cache/MemoryBackendFactory.php \Drupal\Core\Cache\MemoryBackendFactory::get()
  2. 8.9.x core/lib/Drupal/Core/Cache/MemoryBackendFactory.php \Drupal\Core\Cache\MemoryBackendFactory::get()
  3. 10 core/lib/Drupal/Core/Cache/MemoryBackendFactory.php \Drupal\Core\Cache\MemoryBackendFactory::get()

Overrides CacheFactoryInterface::get

File

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

Class

MemoryBackendFactory

Namespace

Drupal\Core\Cache

Code

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

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