private function purgeByCacheTag($tag)
    {
        $cacheTagsCacheDir = $this->getTagPath($tag);
        if (!file_exists($cacheTagsCacheDir) || !is_dir($cacheTagsCacheDir)) {
            return;
        }

        $files = (new Finder())->files()->in($cacheTagsCacheDir);
        foreach ($files as $file) {
            // @todo Change to be able to reuse parent::invalidate() or parent::purge() ?
            if ($digest = file_get_contents($file->getRealPath())) {
                @unlink($this->getPath($digest));
            }
            @unlink($file);
        }
        // We let folder stay in case another process have just written new cache tags.
    }
private function purgeByCacheTag($tag)
    {
        $cacheTagsCacheDir = $this->getTagPath($tag);
        if (!file_exists($cacheTagsCacheDir) || !is_dir($cacheTagsCacheDir)) {
            return;
        }

        $files = (new Finder())->files()->in($cacheTagsCacheDir);
        foreach ($files as $file) {
            // @todo Change to be able to reuse parent::invalidate() or parent::purge() ?
            if ($digest = file_get_contents($file->getRealPath())) {
                @unlink($this->getPath($digest));
            }
            @unlink($file);
        }
        // We let folder stay in case another process have just written new cache tags.
    }
private function purgeByCacheTag ( $ tag ) { $ cacheTagsCacheDir = $ this -> getTagPath ( $ tag ) ; if ( ! file_exists ( $ cacheTagsCacheDir ) || ! is_dir ( $ cacheTagsCacheDir ) ) { return ; } $ files = ( new Finder ( ) ) -> files ( ) -> in ( $ cacheTagsCacheDir ) ; foreach ( $ files as $ file ) { // @todo Change to be able to reuse parent::invalidate() or parent::purge() ? if ( $ digest = file_get_contents ( $ file -> getRealPath ( ) ) ) { @ unlink ( $ this -> getPath ( $ digest ) ) ; } @ unlink ( $ file ) ; } // We let folder stay in case another process have just written new cache tags. }
Purges cache for tag.

@param string $tag
Purges cache for tag .