You are here

class VoidCache in Plug 7

Void cache driver. The cache could be of use in tests where you don`t need to cache anything.

@link www.doctrine-project.org @since 1.5 @author Kotlyar Maksim <kotlyar.maksim@gmail.com>

Hierarchy

Expanded class hierarchy of VoidCache

1 file declares its use of VoidCache
VoidCacheTest.php in lib/doctrine/cache/tests/Doctrine/Tests/Common/Cache/VoidCacheTest.php

File

lib/doctrine/cache/lib/Doctrine/Common/Cache/VoidCache.php, line 29

Namespace

Doctrine\Common\Cache
View source
class VoidCache extends CacheProvider {

  /**
   * {@inheritDoc}
   */
  protected function doFetch($id) {
    return false;
  }

  /**
   * {@inheritDoc}
   */
  protected function doContains($id) {
    return false;
  }

  /**
   * {@inheritDoc}
   */
  protected function doSave($id, $data, $lifeTime = 0) {
    return true;
  }

  /**
   * {@inheritDoc}
   */
  protected function doDelete($id) {
    return true;
  }

  /**
   * {@inheritDoc}
   */
  protected function doFlush() {
    return true;
  }

  /**
   * {@inheritDoc}
   */
  protected function doGetStats() {
    return;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Cache::STATS_HITS constant
Cache::STATS_MEMORY_AVAILABLE constant
Cache::STATS_MEMORY_AVAILIABLE constant Only for backward compatibility (may be removed in next major release)
Cache::STATS_MEMORY_USAGE constant
Cache::STATS_MISSES constant
Cache::STATS_UPTIME constant
CacheProvider::$namespace private property The namespace to prefix all cache ids with.
CacheProvider::$namespaceVersion private property The namespace version.
CacheProvider::contains public function Tests if an entry exists in the cache. Overrides Cache::contains
CacheProvider::delete public function Deletes a cache entry. Overrides Cache::delete
CacheProvider::deleteAll public function Deletes all cache entries. Overrides ClearableCache::deleteAll
CacheProvider::DOCTRINE_NAMESPACE_CACHEKEY constant
CacheProvider::doFetchMultiple protected function Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it. 4
CacheProvider::fetch public function Fetches an entry from the cache. Overrides Cache::fetch
CacheProvider::fetchMultiple public function Returns an associative array of values for keys is found in cache. Overrides MultiGetCache::fetchMultiple
CacheProvider::flushAll public function Flushes all cache entries. Overrides FlushableCache::flushAll
CacheProvider::getNamespace public function Retrieves the namespace that prefixes all cache ids.
CacheProvider::getNamespaceCacheKey private function Returns the namespace cache key.
CacheProvider::getNamespacedId private function Prefixes the passed id with the configured namespace value.
CacheProvider::getNamespaceVersion private function Returns the namespace version.
CacheProvider::getStats public function Retrieves cached information from the data store. Overrides Cache::getStats
CacheProvider::save public function Puts data into the cache. Overrides Cache::save
CacheProvider::setNamespace public function Sets the namespace to prefix all cache ids with. 1
VoidCache::doContains protected function Tests if an entry exists in the cache. Overrides CacheProvider::doContains
VoidCache::doDelete protected function Deletes a cache entry. Overrides CacheProvider::doDelete
VoidCache::doFetch protected function Fetches an entry from the cache. Overrides CacheProvider::doFetch
VoidCache::doFlush protected function Flushes all cache entries. Overrides CacheProvider::doFlush
VoidCache::doGetStats protected function Retrieves cached information from the data store. Overrides CacheProvider::doGetStats
VoidCache::doSave protected function Puts data into the cache. Overrides CacheProvider::doSave