You are here

public function CacheRawBackendInterface::delete in Supercache 2.0.x

Same name and namespace in other branches
  1. 8 src/Cache/CacheRawBackendInterface.php \Drupal\supercache\Cache\CacheRawBackendInterface::delete()

Deletes an item from the cache.

If the cache item is being deleted because it is no longer "fresh", you may consider using invalidate() instead. This allows callers to retrieve the invalid item by calling get() with $allow_invalid set to TRUE. In some cases an invalid item may be acceptable rather than having to rebuild the cache.

Parameters

string $cid: The cache ID to delete.

See also

\Drupal\Core\Cache\CacheRawBackendInterface::deleteMultiple()

\Drupal\Core\Cache\CacheRawBackendInterface::deleteAll()

3 methods override CacheRawBackendInterface::delete()
ApcuRawBackend::delete in src/Cache/ApcuRawBackend.php
Deletes an item from the cache.
ChainedFastRawBackend::delete in src/Cache/ChainedFastRawBackend.php
Deletes an item from the cache.
DatabaseRawBackend::delete in src/Cache/DatabaseRawBackend.php
Deletes an item from the cache.

File

src/Cache/CacheRawBackendInterface.php, line 118
Contains \Drupal\supercache\Cache\CacheRawBackendInterface.

Class

CacheRawBackendInterface
Defines an interface for cache implementations.

Namespace

Drupal\supercache\Cache

Code

public function delete($cid);