You are here

function dmemcache_flush in Memcache API and Integration 5

Same name and namespace in other branches
  1. 5.2 dmemcache.inc \dmemcache_flush()
  2. 6 dmemcache.inc \dmemcache_flush()
  3. 7 dmemcache.inc \dmemcache_flush()

Immediately invalidates all existing items. dmemcache_flush doesn't actually free any resources, it only marks all the items as expired, so occupied memory will be overwritten by new items.

Parameters

$bin The bin to flush. Note that this will flush all bins mapped to the same server: as $bin. There is no way at this time to empty just one bin.

Return value

Returns TRUE on success or FALSE on failure.

2 calls to dmemcache_flush()
cache_clear_all in ./memcache.db.inc
Expire data from the cache. If called without arguments, expirable entries will be cleared from the cache_page table.
cache_clear_all in ./memcache.inc
Expire data from the cache. If called without arguments, expirable entries will be cleared from the cache_page table.

File

./dmemcache.inc, line 110

Code

function dmemcache_flush($bin = 'cache') {
  if ($mc = dmemcache_object($bin)) {
    return $mc
      ->flush();
  }
}