You are here

protected function MongoDBCache::doDelete 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::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

2 calls to MongoDBCache::doDelete()
MongoDBCache::doContains in vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
Tests if an entry exists in the cache.
MongoDBCache::doFetch in vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
Fetches an entry from the cache.

File

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

Class

MongoDBCache
MongoDB cache provider.

Namespace

Doctrine\Common\Cache

Code

protected function doDelete($id) {
  $result = $this->collection
    ->remove(array(
    '_id' => $id,
  ));
  return isset($result['n']) ? $result['n'] == 1 : true;
}