class MemoryCounterBackendFactory in Drupal 10
Same name and namespace in other branches
- 9 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];
}
}