class SuperStaticCache in Tome 8
Decorates the Tome Static cache service to prevent deletions.
Hierarchy
- class \Drupal\Core\Cache\DatabaseBackend implements CacheBackendInterface
- class \Drupal\tome_static\StaticCache implements StaticCacheInterface
- class \Drupal\tome_static_super_cache\SuperStaticCache
- class \Drupal\tome_static\StaticCache implements StaticCacheInterface
Expanded class hierarchy of SuperStaticCache
3 files declare their use of SuperStaticCache
- SuperStaticCacheTest.php in modules/
tome_static/ modules/ tome_static_super_cache/ tests/ src/ Kernel/ SuperStaticCacheTest.php - TomeSuperCacheRebuildCommand.php in modules/
tome_static/ modules/ tome_static_super_cache/ src/ Commands/ TomeSuperCacheRebuildCommand.php - tome_static_super_cache.module in modules/
tome_static/ modules/ tome_static_super_cache/ tome_static_super_cache.module - Contains functions for the Tome Static Super Cache module.
1 string reference to 'SuperStaticCache'
- tome_static_super_cache.services.yml in modules/
tome_static/ modules/ tome_static_super_cache/ tome_static_super_cache.services.yml - modules/tome_static/modules/tome_static_super_cache/tome_static_super_cache.services.yml
1 service uses SuperStaticCache
- tome_static_super_cache.cache.tome_static in modules/
tome_static/ modules/ tome_static_super_cache/ tome_static_super_cache.services.yml - Drupal\tome_static_super_cache\SuperStaticCache
File
- modules/
tome_static/ modules/ tome_static_super_cache/ src/ SuperStaticCache.php, line 10
Namespace
Drupal\tome_static_super_cacheView source
class SuperStaticCache extends StaticCache {
/**
* The global key to flag a full rebuild.
*
* @var string
*/
const FULL_REBUILD_KEY = 'tome_static_super_cache_full_rebuild';
/**
* The global key to flag a normal rebuild.
*
* @var string
*/
const REBUILD_KEY = 'tome_static_super_cache_rebuild';
/**
* {@inheritdoc}
*/
public function deleteAll() {
if (isset($GLOBALS[self::FULL_REBUILD_KEY])) {
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 |
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:: |
|
StaticCache:: |
public | function |
Filters paths that are uncached from a given array. Overrides StaticCacheInterface:: |
|
StaticCache:: |
public | function |
Performs garbage collection on a cache bin. Overrides DatabaseBackend:: |
|
StaticCache:: |
protected | function | Gets the Tome cache ID for this request. | |
StaticCache:: |
public | function |
Gets files that are in cache but invalid, and can be deleted. Overrides StaticCacheInterface:: |
|
StaticCache:: |
public | function |
Checks if the cache is empty. Overrides StaticCacheInterface:: |
|
StaticCache:: |
public | function |
Adds to the Tome cache. Overrides StaticCacheInterface:: |
|
StaticCache:: |
public | function |
Constructs a StaticCache object. Overrides DatabaseBackend:: |
|
SuperStaticCache:: |
public | function |
Deletes all cache items in a bin. Overrides DatabaseBackend:: |
|
SuperStaticCache:: |
constant | The global key to flag a full rebuild. | ||
SuperStaticCache:: |
constant | The global key to flag a normal rebuild. |