sitemap_status-1.0.0-alpha4/src/Cache/DatabaseBackend.php
src/Cache/DatabaseBackend.php
<?php
namespace Drupal\sitemap_status\Cache;
use Drupal\Core\Cache\DatabaseBackend as CoreDatabaseBackend;
/**
* Defines the cache implementation.
*
* Extends Drupal's default cache implementation.
*
* @ingroup cache
*/
class DatabaseBackend extends CoreDatabaseBackend {
/**
* {@inheritdoc}
*/
public function deleteAll() {
// Preserve the cache if set in the config.
$config = \Drupal::config('sitemap_status.settings');
$preserveCache = $config->get('preserve_cache');
if ($preserveCache !== 1) {
parent::deleteAll();
}
}
}
