Cache/CachedMinifier.php
public function minify($content, $options)
    {
        if ($this->cacheDir) {
            if (!file_exists($this->cacheDir)) {
                mkdir($this->cacheDir, 0777, true);
            }

            $hash = md5($content);
            $file = implode(DIRECTORY_SEPARATOR, array($this->cacheDir, $hash));
            if (!file_exists($file)) {
                file_put_contents($file, \JShrink\Minifier::minify($content, $options));
            }

            return file_get_contents($file);
        } else {
            return \JShrink\Minifier::minify($content, $options);
        }
    }
public function minify($content, $options)
    {
        if ($this->cacheDir) {
            if (!file_exists($this->cacheDir)) {
                mkdir($this->cacheDir, 0777, true);
            }

            $hash = md5($content);
            $file = implode(DIRECTORY_SEPARATOR, array($this->cacheDir, $hash));
            if (!file_exists($file)) {
                file_put_contents($file, \JShrink\Minifier::minify($content, $options));
            }

            return file_get_contents($file);
        } else {
            return \JShrink\Minifier::minify($content, $options);
        }
    }
public function minify ( $ content , $ options ) { if ( $ this -> cacheDir ) { if ( ! file_exists ( $ this -> cacheDir ) ) { mkdir ( $ this -> cacheDir , 0777 , true ) ; } $ hash = md5 ( $ content ) ; $ file = implode ( DIRECTORY_SEPARATOR , array ( $ this -> cacheDir , $ hash ) ) ; if ( ! file_exists ( $ file ) ) { file_put_contents ( $ file , \ JShrink \ Minifier :: minify ( $ content , $ options ) ) ; } return file_get_contents ( $ file ) ; } else { return \ JShrink \ Minifier :: minify ( $ content , $ options ) ; } }
{@inheritdoc}
{