class MemoryCounterBackendFactory in Drupal 9
Hierarchy
- class \Drupal\Core\Cache\MemoryCounterBackendFactory implements 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
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| MemoryCounterBackendFactory:: | protected | property | Instantiated memory cache bins. | |
| MemoryCounterBackendFactory:: | public | function | Gets a cache backend class for a given cache bin. Overrides CacheFactoryInterface:: | 
