You are here

protected function MongoDBCache::doDelete in Plug 7

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 lib/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
Tests if an entry exists in the cache.
MongoDBCache::doFetch in lib/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
Fetches an entry from the cache.

File

lib/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;
}