SuperStaticCache.php in Tome 8
Namespace
Drupal\tome_static_super_cacheFile
modules/tome_static/modules/tome_static_super_cache/src/SuperStaticCache.phpView source
<?php
namespace Drupal\tome_static_super_cache;
use Drupal\tome_static\StaticCache;
/**
 * Decorates the Tome Static cache service to prevent deletions.
 */
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();
    }
  }
}Classes
| 
            Name | 
                  Description | 
|---|---|
| SuperStaticCache | Decorates the Tome Static cache service to prevent deletions. |