You are here

function CacheManager::renewCachePrefix in X Autoload 7.4

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

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

File

lib/CacheManager/CacheManager.php, line 51

Class

CacheManager

Namespace

Drupal\xautoload\CacheManager

Code

function renewCachePrefix() {
  $this->prefix = Util::randomString();
  variable_set('xautoload_cache_prefix', $this->prefix);
  foreach ($this->observers as $observer) {
    $observer
      ->setCachePrefix($this->prefix);
  }
}