class PermanentMemcacheBackend in Permanent Cache Bin 8.2
Same name and namespace in other branches
- 8 modules/pcb_memcache/src/Cache/PermanentMemcacheBackend.php \Drupal\pcb_memcache\Cache\PermanentMemcacheBackend
Defines a permanent memcache cache implementation.
This cache implementation can be used for data like stock which don't really need to be cleared during normal cache rebuilds and need to be cleared . It uses the database to store cached data. Each cache bin corresponds to a database table by the same name.
Hierarchy
- class \Drupal\pcb_memcache\Cache\PermanentMemcacheBackend extends \Drupal\memcache\MemcacheBackend
Expanded class hierarchy of PermanentMemcacheBackend
File
- modules/
pcb_memcache/ src/ Cache/ PermanentMemcacheBackend.php, line 18
Namespace
Drupal\pcb_memcache\CacheView source
class PermanentMemcacheBackend extends MemcacheBackend {
/**
* {@inheritdoc}
*/
public function deleteAll() {
// This cache doesn't need to be deleted when doing cache rebuild.
// We do nothing here.
}
/**
* Deletes all cache items in a bin when explicitly called.
*
* @see \Drupal\Core\Cache\DatabaseBackend::deleteAll()
*/
public function deleteAllPermanent() {
parent::deleteAll();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PermanentMemcacheBackend:: |
public | function | Deletes all cache items in a bin. | |
PermanentMemcacheBackend:: |
public | function | Deletes all cache items in a bin when explicitly called. |