Sulu\Bundle\MediaBundle\Media\FormatCache\FormatCacheClearer::clear PHP Method

clear() public method

Clear all or the given cache.
public clear ( string $cache = null )
$cache string The alias of the cache
    public function clear($cache = null)
    {
        if (null !== $cache) {
            if (!array_key_exists($cache, $this->caches)) {
                throw new CacheNotFoundException($cache);
            }
            $this->caches[$cache]->clear();
        } else {
            foreach ($this->caches as $cache) {
                $cache->clear();
            }
        }
    }
FormatCacheClearer