function MemoryCounterBackendFactory::get

Same name in other branches
  1. 9 core/lib/Drupal/Core/Cache/MemoryCounterBackendFactory.php \Drupal\Core\Cache\MemoryCounterBackendFactory::get()
  2. 11.x core/lib/Drupal/Core/Cache/MemoryCounterBackendFactory.php \Drupal\Core\Cache\MemoryCounterBackendFactory::get()

File

core/lib/Drupal/Core/Cache/MemoryCounterBackendFactory.php, line 32

Class

MemoryCounterBackendFactory

Namespace

Drupal\Core\Cache

Code

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

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