You are here

protected function MongoDBCache::doFlush in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php \Doctrine\Common\Cache\MongoDBCache::doFlush()

Flushes all cache entries.

Return value

boolean TRUE if the cache entries were successfully flushed, FALSE otherwise.

Overrides CacheProvider::doFlush

File

vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php, line 147

Class

MongoDBCache
MongoDB cache provider.

Namespace

Doctrine\Common\Cache

Code

protected function doFlush() {

  // Use remove() in lieu of drop() to maintain any collection indexes
  $result = $this->collection
    ->remove();
  return isset($result['ok']) ? $result['ok'] == 1 : true;
}