You are here

function CacheManager::renewCachePrefix in X Autoload 7.5

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

Renew the cache prefix, save it, and notify all observers.

File

src/CacheManager/CacheManager.php, line 61

Class

CacheManager

Namespace

Drupal\xautoload\CacheManager

Code

function renewCachePrefix() {
  $this->prefix = Util::randomString();
  $this->system
    ->variableSet(XAUTOLOAD_VARNAME_CACHE_PREFIX, $this->prefix);
  foreach ($this->observers as $observer) {
    $observer
      ->setCachePrefix($this->prefix);
  }
}