lib/Minify/ScssCssSource.php
private function getCache()
    {
        // cache for single run
        // so that getLastModified and getContent in single request do not add additional cache roundtrips (i.e memcache)
        if (isset($this->parsed)) {
            return $this->parsed;
        }

        // check from cache first
        $cache = null;
        $cacheId = $this->getCacheId();
        if ($this->cache->isValid($cacheId, 0)) {
            if ($cache = $this->cache->fetch($cacheId)) {
                $cache = unserialize($cache);
            }
        }

        $input = $cache ? $cache : $this->filepath;

        if ($this->cacheIsStale($cache)) {
            $cache = $this->compile($this->filepath);
        }

        if (!is_array($input) || $cache['updated'] > $input['updated']) {
            $this->cache->store($cacheId, serialize($cache));
        }

        return $this->parsed = $cache;
    }
private function getCache()
    {
        // cache for single run
        // so that getLastModified and getContent in single request do not add additional cache roundtrips (i.e memcache)
        if (isset($this->parsed)) {
            return $this->parsed;
        }

        // check from cache first
        $cache = null;
        $cacheId = $this->getCacheId();
        if ($this->cache->isValid($cacheId, 0)) {
            if ($cache = $this->cache->fetch($cacheId)) {
                $cache = unserialize($cache);
            }
        }

        $input = $cache ? $cache : $this->filepath;

        if ($this->cacheIsStale($cache)) {
            $cache = $this->compile($this->filepath);
        }

        if (!is_array($input) || $cache['updated'] > $input['updated']) {
            $this->cache->store($cacheId, serialize($cache));
        }

        return $this->parsed = $cache;
    }
private function getCache ( ) { // cache for single run // so that getLastModified and getContent in single request do not add additional cache roundtrips (i.e memcache) if ( isset ( $ this -> parsed ) ) { return $ this -> parsed ; } // check from cache first $ cache = null ; $ cacheId = $ this -> getCacheId ( ) ; if ( $ this -> cache -> isValid ( $ cacheId , 0 ) ) { if ( $ cache = $ this -> cache -> fetch ( $ cacheId ) ) { $ cache = unserialize ( $ cache ) ; } } $ input = $ cache ? $ cache : $ this -> filepath ; if ( $ this -> cacheIsStale ( $ cache ) ) { $ cache = $ this -> compile ( $ this -> filepath ) ; } if ( ! is_array ( $ input ) || $ cache [ 'updated' ] > $ input [ 'updated' ] ) { $ this -> cache -> store ( $ cacheId , serialize ( $ cache ) ) ; } return $ this -> parsed = $ cache ; }
Get SCSS cache object

Runs the compilation if needed

Implements Leafo\ScssPhp\Server logic because we need to get parsed files without parsing actual content

@return array
Get SCSS cache object