Issue #2433595 by chx, Berdir: WebTestBase::refreshVariables only resets cache_tags.invalidator.checksum
parent
37fec7e9e9
commit
b6ee00e248
|
@ -41,6 +41,19 @@ class CacheTagsInvalidator implements CacheTagsInvalidatorInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset statically cached tags in all cache tag checksum services.
|
||||||
|
*
|
||||||
|
* This is only used by tests.
|
||||||
|
*/
|
||||||
|
public function resetChecksums() {
|
||||||
|
foreach ($this->invalidators as $invalidator) {
|
||||||
|
if ($invalidator instanceof CacheTagsChecksumInterface) {
|
||||||
|
$invalidator->reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a cache tags invalidator.
|
* Adds a cache tags invalidator.
|
||||||
*
|
*
|
||||||
|
|
|
@ -1192,7 +1192,7 @@ abstract class WebTestBase extends TestBase {
|
||||||
*/
|
*/
|
||||||
protected function refreshVariables() {
|
protected function refreshVariables() {
|
||||||
// Clear the tag cache.
|
// Clear the tag cache.
|
||||||
\Drupal::service('cache_tags.invalidator.checksum')->reset();
|
\Drupal::service('cache_tags.invalidator')->resetChecksums();
|
||||||
foreach (Cache::getBins() as $backend) {
|
foreach (Cache::getBins() as $backend) {
|
||||||
if (is_callable(array($backend, 'reset'))) {
|
if (is_callable(array($backend, 'reset'))) {
|
||||||
$backend->reset();
|
$backend->reset();
|
||||||
|
|
Loading…
Reference in New Issue