class PermanentDatabaseBackend in Permanent Cache Bin 8.2
Same name and namespace in other branches
- 8 src/Cache/PermanentDatabaseBackend.php \Drupal\pcb\Cache\PermanentDatabaseBackend
Defines a permanent database 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\Core\Cache\DatabaseBackend implements CacheBackendInterface
- class \Drupal\pcb\Cache\PermanentDatabaseBackend
Expanded class hierarchy of PermanentDatabaseBackend
File
- src/
Cache/ PermanentDatabaseBackend.php, line 18
Namespace
Drupal\pcb\CacheView source
class PermanentDatabaseBackend extends DatabaseBackend {
/**
* {@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 |
---|---|---|---|---|
CacheBackendInterface:: |
constant | Indicates that the item should never be removed unless explicitly deleted. | ||
DatabaseBackend:: |
protected | property | ||
DatabaseBackend:: |
protected | property | The cache tags checksum provider. | |
DatabaseBackend:: |
protected | property | The database connection. | |
DatabaseBackend:: |
protected | property | The maximum number of rows that this cache bin table is allowed to store. | |
DatabaseBackend:: |
protected | function | Act on an exception when cache might be stale. | |
DatabaseBackend:: |
constant | The default maximum number of rows that this cache bin table can store. | ||
DatabaseBackend:: |
public | function |
Deletes an item from the cache. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function |
Deletes multiple items from the cache. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
protected | function | Stores multiple items in the persistent cache. | |
DatabaseBackend:: |
protected | function | Check if the cache bin exists and create it if not. | |
DatabaseBackend:: |
public | function |
Performs garbage collection on a cache bin. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function |
Returns data from the persistent cache. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function | The maximum number of rows that this cache bin table is allowed to store. | |
DatabaseBackend:: |
public | function |
Returns data from the persistent cache when given an array of cache IDs. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function |
Marks a cache item as invalid. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function |
Marks all cache items as invalid. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function |
Marks cache items as invalid. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
constant | -1 means infinite allows numbers of rows for the cache backend. | ||
DatabaseBackend:: |
protected | function | Normalizes a cache ID in order to comply with database limitations. | |
DatabaseBackend:: |
protected | function | Prepares a cached item. | |
DatabaseBackend:: |
public | function |
Remove a cache bin. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function | Defines the schema for the {cache_*} bin tables. | |
DatabaseBackend:: |
public | function |
Stores data in the persistent cache. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function |
Store multiple items in the persistent cache. Overrides CacheBackendInterface:: |
|
DatabaseBackend:: |
public | function | Constructs a DatabaseBackend object. | |
PermanentDatabaseBackend:: |
public | function |
Deletes all cache items in a bin. Overrides DatabaseBackend:: |
|
PermanentDatabaseBackend:: |
public | function | Deletes all cache items in a bin when explicitly called. |