You are here

protected function RiakCache::doDelete in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php \Doctrine\Common\Cache\RiakCache::doDelete()

Deletes a cache entry.

Parameters

string $id The cache id.:

Return value

boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.

Overrides CacheProvider::doDelete

File

vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php, line 153

Class

RiakCache
Riak cache provider.

Namespace

Doctrine\Common\Cache

Code

protected function doDelete($id) {
  try {
    $this->bucket
      ->delete($id);
    return true;
  } catch (Exception\BadArgumentsException $e) {

    // Key did not exist on cluster already
  } catch (Exception\RiakException $e) {

    // Covers:
    // - Riak\Exception\ConnectionException
    // - Riak\Exception\CommunicationException
    // - Riak\Exception\UnexpectedResponseException
  }
  return false;
}