You are here

MemoryBackendFactory.php in Zircon Profile 8.0

Same filename and directory in other branches
  1. 8 core/lib/Drupal/Core/Cache/MemoryBackendFactory.php

Namespace

Drupal\Core\Cache

File

core/lib/Drupal/Core/Cache/MemoryBackendFactory.php
View source
<?php

/**
 * @file
 * Contains \Drupal\Core\Cache\MemoryBackendFactory.
 */
namespace Drupal\Core\Cache;

class MemoryBackendFactory implements CacheFactoryInterface {

  /**
   * Instantiated memory cache bins.
   *
   * @var \Drupal\Core\Cache\MemoryBackend[]
   */
  protected $bins = array();

  /**
   * {@inheritdoc}
   */
  function get($bin) {
    if (!isset($this->bins[$bin])) {
      $this->bins[$bin] = new MemoryBackend($bin);
    }
    return $this->bins[$bin];
  }

}

Classes