You are here

public static function MemcacheStorageAPI::delete in Memcache Storage 7

Delete value from memcached pool. Provide debug logging.

See also

http://www.php.net/manual/en/memcache.delete.php

12 calls to MemcacheStorageAPI::delete()
drupal_session_destroy_uid in includes/session.inc
Ends a specific user's session(s).
drupal_session_regenerate in includes/session.inc
Called when an anonymous user becomes authenticated or vice-versa.
lock_release in includes/lock.inc
Release a lock previously acquired by lock_acquire().
lock_release_all in includes/lock.inc
Release all previously acquired locks.
MemcacheStorage::clear in ./memcache_storage.inc
Implements DrupalCacheInterface::clear().

... See full list

File

./memcache_storage.api.inc, line 387
Provide class that processes memcached operations.

Class

MemcacheStorageAPI
Integrates with memcache API.

Code

public static function delete($cache_id, $cache_bin = '') {

  // Get memcache object.
  $memcache = self::openConnection($cache_bin);

  // No memcache connection.
  if (empty($memcache)) {
    return FALSE;
  }

  // Build unique cache id.
  $cid = self::preprocessCacheKey($cache_id, $cache_bin);

  // Run initial debug actions.
  if (variable_get('memcache_storage_debug', FALSE)) {
    self::initialDebugActions();
  }

  // Delete cached data from memcached.
  $result = @$memcache
    ->delete($cid);

  // Run final debug actions.
  if (variable_get('memcache_storage_debug', FALSE)) {
    self::finalDebugActions('delete', $cache_bin, $cache_id, $cid, $result);
  }
  return $result;
}