src/Sulu/Bundle/MediaBundle/Media/FormatCache/FormatCacheClearer.php
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();
            }
        }
    }
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();
            }
        }
    }
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 ( ) ; } } }
Clear all or the given cache.

@param string $cache The alias of the cache

@throws CacheNotFoundException if the cache is not found
Clear all or the given cache .