You are here

protected function RiakCache::doFlush in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php \Doctrine\Common\Cache\RiakCache::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/RiakCache.php, line 174

Class

RiakCache
Riak cache provider.

Namespace

Doctrine\Common\Cache

Code

protected function doFlush() {
  try {
    $keyList = $this->bucket
      ->getKeyList();
    foreach ($keyList as $key) {
      $this->bucket
        ->delete($key);
    }
    return true;
  } catch (Exception\RiakException $e) {

    // Do nothing
  }
  return false;
}