private function CacheProvider::getNamespaceVersion

Namespace version

Return value

string $namespaceVersion

2 calls to CacheProvider::getNamespaceVersion()
CacheProvider::deleteAll in drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/CacheProvider.php
Delete all cache entries.
CacheProvider::getNamespacedId in drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/CacheProvider.php
Prefix the passed id with the configured namespace value

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/CacheProvider.php, line 161

Class

CacheProvider
Base class for cache provider implementations.

Namespace

Doctrine\Common\Cache

Code

private function getNamespaceVersion() {
  if (null !== $this->namespaceVersion) {
    return $this->namespaceVersion;
  }
  $namespaceCacheKey = $this
    ->getNamespaceCacheKey();
  $namespaceVersion = $this
    ->doFetch($namespaceCacheKey);
  if (false === $namespaceVersion) {
    $namespaceVersion = 1;
    $this
      ->doSave($namespaceCacheKey, $namespaceVersion);
  }
  $this->namespaceVersion = $namespaceVersion;
  return $this->namespaceVersion;
}