class MemoryCounterBackendFactory
Same name in other branches
- 10 core/lib/Drupal/Core/Cache/MemoryCounterBackendFactory.php \Drupal\Core\Cache\MemoryCounterBackendFactory
- 11.x core/lib/Drupal/Core/Cache/MemoryCounterBackendFactory.php \Drupal\Core\Cache\MemoryCounterBackendFactory
Hierarchy
- class \Drupal\Core\Cache\MemoryCounterBackendFactory implements \Drupal\Core\Cache\CacheFactoryInterface
Expanded class hierarchy of MemoryCounterBackendFactory
1 file declares its use of MemoryCounterBackendFactory
- MigrateSqlSourceTestBase.php in core/
modules/ migrate/ tests/ src/ Kernel/ MigrateSqlSourceTestBase.php
File
-
core/
lib/ Drupal/ Core/ Cache/ MemoryCounterBackendFactory.php, line 5
Namespace
Drupal\Core\CacheView source
class MemoryCounterBackendFactory implements CacheFactoryInterface {
/**
* Instantiated memory cache bins.
*
* @var \Drupal\Core\Cache\MemoryBackend[]
*/
protected $bins = [];
/**
* {@inheritdoc}
*/
public function get($bin) {
if (!isset($this->bins[$bin])) {
$this->bins[$bin] = new MemoryCounterBackend();
}
return $this->bins[$bin];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
MemoryCounterBackendFactory::$bins | protected | property | Instantiated memory cache bins. | |
MemoryCounterBackendFactory::get | public | function | Gets a cache backend class for a given cache bin. | Overrides CacheFactoryInterface::get |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.