class MemoryBackendFactory
Same name in other branches
- 9 core/lib/Drupal/Core/Cache/MemoryBackendFactory.php \Drupal\Core\Cache\MemoryBackendFactory
- 10 core/lib/Drupal/Core/Cache/MemoryBackendFactory.php \Drupal\Core\Cache\MemoryBackendFactory
- 11.x core/lib/Drupal/Core/Cache/MemoryBackendFactory.php \Drupal\Core\Cache\MemoryBackendFactory
Hierarchy
- class \Drupal\Core\Cache\MemoryBackendFactory implements \Drupal\Core\Cache\CacheFactoryInterface
Expanded class hierarchy of MemoryBackendFactory
1 string reference to 'MemoryBackendFactory'
- core.services.yml in core/
core.services.yml - core/core.services.yml
1 service uses MemoryBackendFactory
File
-
core/
lib/ Drupal/ Core/ Cache/ MemoryBackendFactory.php, line 5
Namespace
Drupal\Core\CacheView source
class MemoryBackendFactory 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 MemoryBackend();
}
return $this->bins[$bin];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
MemoryBackendFactory::$bins | protected | property | Instantiated memory cache bins. | |
MemoryBackendFactory::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.