You are here

private function CacheProvider::getNamespaceVersion in Plug 7

Returns the namespace version.

Return value

integer

2 calls to CacheProvider::getNamespaceVersion()
CacheProvider::deleteAll in lib/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
Deletes all cache entries.
CacheProvider::getNamespacedId in lib/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php
Prefixes the passed id with the configured namespace value.

File

lib/doctrine/cache/lib/Doctrine/Common/Cache/CacheProvider.php, line 184

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;
}