Neos\Cache\Backend\PdoBackend::flushByTag PHP Method

flushByTag() public method

Removes all cache entries of this cache which are tagged by the specified tag.
public flushByTag ( string $tag ) : void
$tag string The tag the entries must have
return void
    public function flushByTag($tag)
    {
        $this->connect();
        $statementHandle = $this->databaseHandle->prepare('DELETE FROM "cache" WHERE "context"=? AND "cache"=? AND "identifier" IN (SELECT "identifier" FROM "tags" WHERE "context"=? AND "cache"=? AND "tag"=?)');
        $statementHandle->execute([md5($this->environmentConfiguration->getApplicationIdentifier()), $this->cacheIdentifier, md5($this->environmentConfiguration->getApplicationIdentifier()), $this->cacheIdentifier, $tag]);
        $statementHandle = $this->databaseHandle->prepare('DELETE FROM "tags" WHERE "context"=? AND "cache"=? AND "tag"=?');
        $statementHandle->execute([md5($this->environmentConfiguration->getApplicationIdentifier()), $this->cacheIdentifier, $tag]);
    }