lib/private/Template/SCSSCacher.php
/**
	 * Check if the file is cached or not
	 * @param string $fileNameCSS
	 * @param ISimpleFolder $folder
	 * @return boolean
	 */
Check if the file is cached or not
@param string $fileNameCSS
@param ISimpleFolder $folder
@return boolean
Check if the file is cached or not @param string $fileNameCSS @param ISimpleFolder $folder @return boolean
private function isCached($fileNameCSS, ISimpleFolder $folder) {
		try {
			$cachedFile = $folder->getFile($fileNameCSS);
			if ($cachedFile->getSize() > 0) {
				$depFileName = $fileNameCSS . '.deps';
				$deps = $this->depsCache->get($folder->getName() . '-' . $depFileName);
				if ($deps === null) {
					$depFile = $folder->getFile($depFileName);
					$deps = $depFile->getContent();
					$this->depsCache->set($folder->getName() . '-' . $depFileName, $deps);
				}
				$deps = json_decode($deps, true);
				foreach ($deps as $file=>$mtime) {
					if (!file_exists($file) || filemtime($file) > $mtime) {
						return false;
					}
				}
			}
			return true;
		} catch(NotFoundException $e) {
			return false;
		}
	}
private function isCached ( $ fileNameCSS , ISimpleFolder $ folder ) { try { $ cachedFile = $ folder -> getFile ( $ fileNameCSS ) ; if ( $ cachedFile -> getSize ( ) > 0 ) { $ depFileName = $ fileNameCSS . '.deps' ; $ deps = $ this -> depsCache -> get ( $ folder -> getName ( ) . '-' . $ depFileName ) ; if ( $ deps === null ) { $ depFile = $ folder -> getFile ( $ depFileName ) ; $ deps = $ depFile -> getContent ( ) ; $ this -> depsCache -> set ( $ folder -> getName ( ) . '-' . $ depFileName , $ deps ) ; } $ deps = json_decode ( $ deps , true ) ; foreach ( $ deps as $ file => $ mtime ) { if ( ! file_exists ( $ file ) || filemtime ( $ file ) > $ mtime ) { return false ; } } } return true ; } catch ( NotFoundException $ e ) { return false ; } }
Check if the file is cached or not
 @param string $fileNameCSS
 @param ISimpleFolder $folder
 @return boolean
Check if the file is cached or not @param string $fileNameCSS @param ISimpleFolder $folder @return boolean
//Set to memcache for next run