Issue Bug Closed

#79236Clear cache for single page doesn't work

Pixelant Developer 01/10/17, 10:17 updated 10/02/18, 11:04

Description

When clear cache for single page using button “Clear cache for this page” it doesn’t work because of typo in variable name on line 214 of CacheManager “sysext/core/Classes/Cache/CacheManager.php”.

public function flushCachesInGroupByTags($groupIdentifier, array $tags)
    {
        if (empty($tag)) {
            return;
        }
        $this->createAllCaches();
        if (!isset($this->cacheGroups[$groupIdentifier])) {
            throw new NoSuchCacheGroupException('No cache in the specified group \'' . $groupIdentifier . '\'', 1390337130);
        }
        foreach ($this->cacheGroups[$groupIdentifier] as $cacheIdentifier) {
            if (isset($this->caches[$cacheIdentifier])) {
                $this->caches[$cacheIdentifier]->flushByTags($tags);
            }
        }
    }

but the “$tag” is never set. it should be “$tags”.

Reviews 1