You are here

static function CacheManager::create in X Autoload 7.5

Same name and namespace in other branches
  1. 7.4 lib/CacheManager/CacheManager.php \Drupal\xautoload\CacheManager\CacheManager::create()

This method has side effects, so it is not the constructor.

Parameters

\Drupal\xautoload\DrupalSystem\DrupalSystemInterface $system:

Return value

CacheManager

1 call to CacheManager::create()
ServiceFactory::cacheManager in src/DIC/ServiceFactory.php

File

src/CacheManager/CacheManager.php, line 41

Class

CacheManager

Namespace

Drupal\xautoload\CacheManager

Code

static function create(DrupalSystemInterface $system) {
  $prefix = $system
    ->variableGet(XAUTOLOAD_VARNAME_CACHE_PREFIX, NULL);
  $manager = new self($prefix, $system);
  if (empty($prefix)) {
    $manager
      ->renewCachePrefix();
  }
  return $manager;
}