Translation/Translator.php
public function removeCacheFile($locale)
    {
        $localeExploded = explode('_', $locale);
        $finder = new Finder();
        $finder->files()->in($this->options['cache_dir'])->name(sprintf( '/catalogue\.%s.*\.php$/', $localeExploded[0]));
        $deleted = true;
        foreach ($finder as $file) {

            $path = $file->getRealPath();
            $this->invalidateSystemCacheForFile($path);
            $deleted = unlink($path);

            $metadata = $path.'.meta';
            if (file_exists($metadata)) {
                $this->invalidateSystemCacheForFile($metadata);
                unlink($metadata);
            }
        }

        return $deleted;
    }
public function removeCacheFile($locale)
    {
        $localeExploded = explode('_', $locale);
        $finder = new Finder();
        $finder->files()->in($this->options['cache_dir'])->name(sprintf( '/catalogue\.%s.*\.php$/', $localeExploded[0]));
        $deleted = true;
        foreach ($finder as $file) {

            $path = $file->getRealPath();
            $this->invalidateSystemCacheForFile($path);
            $deleted = unlink($path);

            $metadata = $path.'.meta';
            if (file_exists($metadata)) {
                $this->invalidateSystemCacheForFile($metadata);
                unlink($metadata);
            }
        }

        return $deleted;
    }
public function removeCacheFile ( $ locale ) { $ localeExploded = explode ( '_' , $ locale ) ; $ finder = new Finder ( ) ; $ finder -> files ( ) -> in ( $ this -> options [ 'cache_dir' ] ) -> name ( sprintf ( '/catalogue\.%s.*\.php$/' , $ localeExploded [ 0 ] ) ) ; $ deleted = true ; foreach ( $ finder as $ file ) { $ path = $ file -> getRealPath ( ) ; $ this -> invalidateSystemCacheForFile ( $ path ) ; $ deleted = unlink ( $ path ) ; $ metadata = $ path . '.meta' ; if ( file_exists ( $ metadata ) ) { $ this -> invalidateSystemCacheForFile ( $ metadata ) ; unlink ( $ metadata ) ; } } return $ deleted ; }
Remove the cache file corresponding to the given locale.

@param string $locale
@return boolean
Remove the cache file corresponding to the given locale .