public function MemcacheMock::delete

Delete item from the server

Parameters

string $key:

Return value

boolean

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcacheMock.php, line 202

Class

MemcacheMock
MemcacheMock for simulating Memcache extension in tests.

Namespace

Symfony\Component\HttpKernel\Tests\Profiler\Mock

Code

public function delete($key) {
  if (!$this->connected) {
    return false;
  }
  if (isset($this->storage[$key])) {
    unset($this->storage[$key]);
    return true;
  }
  return false;
}