public static function retrieve(FileSystemCacheKey $key, $newer_than=null) {
		$filename = $key->getFileName();
		
		if(!file_exists($filename)) return false;
		
		//if cached data is not newer than $newer_than
		if($newer_than && filemtime($filename) < $newer_than) return false;

		$fh = self::getFileHandle($filename,'r');
		if(!$fh) return false;
		
		$data = self::getContents($fh,$key);
		if(!$data) return false;


		self::closeFile($fh);		
		return $data->value;
	}
public static function retrieve(FileSystemCacheKey $key, $newer_than=null) {
		$filename = $key->getFileName();
		
		if(!file_exists($filename)) return false;
		
		//if cached data is not newer than $newer_than
		if($newer_than && filemtime($filename) < $newer_than) return false;

		$fh = self::getFileHandle($filename,'r');
		if(!$fh) return false;
		
		$data = self::getContents($fh,$key);
		if(!$data) return false;


		self::closeFile($fh);		
		return $data->value;
	}
public static function retrieve ( FileSystemCacheKey $ key , $ newer_than = null ) { $ filename = $ key -> getFileName ( ) ; if ( ! file_exists ( $ filename ) ) return false ; //if cached data is not newer than $newer_than if ( $ newer_than && filemtime ( $ filename ) < $ newer_than ) return false ; $ fh = self :: getFileHandle ( $ filename , 'r' ) ; if ( ! $ fh ) return false ; $ data = self :: getContents ( $ fh , $ key ) ; if ( ! $ data ) return false ; self :: closeFile ( $ fh ) ; return $ data -> value ; }
Retrieve data from cache
@param FileSystemCacheKey $key The cache key
@param int $newer_than If passed, only return if the cached value was created after this time
@return mixed The cached data or FALSE if not found or expired
Retrieve data from cache