You are here

class ApcuRawBackendFactory in Supercache 8

Same name and namespace in other branches
  1. 2.0.x src/Cache/ApcuRawBackendFactory.php \Drupal\supercache\Cache\ApcuRawBackendFactory

Hierarchy

Expanded class hierarchy of ApcuRawBackendFactory

3 files declare their use of ApcuRawBackendFactory
ApcuRawBackendGeneralTestCaseTrait.php in src/Tests/Cache/ApcuRawBackendGeneralTestCaseTrait.php
CacheCacheTagsChecksumTests.php in src/Tests/Cache/CacheCacheTagsChecksumTests.php
CacheServicesTrait.php in src/Tests/Generic/Cache/CacheServicesTrait.php
1 string reference to 'ApcuRawBackendFactory'
supercache.services.yml in ./supercache.services.yml
supercache.services.yml
1 service uses ApcuRawBackendFactory
cache.rawbackend.apcu in ./supercache.services.yml
Drupal\supercache\Cache\ApcuRawBackendFactory

File

src/Cache/ApcuRawBackendFactory.php, line 13
Contains \Drupal\supercache\Cache\ApcuRawBackendFactory.

Namespace

Drupal\supercache\Cache
View source
class ApcuRawBackendFactory implements CacheRawFactoryInterface {

  /**
   * The cache tags checksum provider.
   *
   * @var string
   */
  protected $sitePrefix;

  /**
   * Constructs the ApcuRawBackendFactory
   *
   * @param string $root
   *   The site's root.
   * @param string $site_path
   *   The site's path.
   */
  function __construct($root, $site_path) {
    $this->sitePrefix = Settings::getApcuPrefix('apcu_backend', $root, $site_path);
  }

  /**
   * Gets DatabaseBackend for the specified cache bin.
   *
   * @param $bin
   *   The cache bin for which the object is created.
   *
   * @return ApcuRawBackend
   *   The cache backend object for the specified cache bin.
   */
  function get($bin) {
    return new ApcuRawBackend($bin, $this->sitePrefix);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ApcuRawBackendFactory::$sitePrefix protected property The cache tags checksum provider.
ApcuRawBackendFactory::get function Gets DatabaseBackend for the specified cache bin. Overrides CacheRawFactoryInterface::get
ApcuRawBackendFactory::__construct function Constructs the ApcuRawBackendFactory