Example #1
0
 /**
  * 获取缓存路径函数
  * @param string 	$filePath	文件名称
  * @param boolean 	$isPack 	是否可选压缩文件
  */
 function getPath($filePath, $isPack = false, $withCache = true)
 {
     if (!$withCache || !$isPack) {
         return $filePath;
     }
     /**
     		if( $GLOBALS['db_filecache_to_memcache'] && Perf::checkMemcache() && in_array ( SCR, array ('index', 'read', 'thread' ))){
     			$_cacheService = perf::gatherCache('pw_filecache');
     			return $_cacheService->getFileCache($filePath);
     		}
     		**/
     if ($GLOBALS['db_cachefile_compress'] && in_array(SCR, array('index', 'read', 'thread'))) {
         return pwPack::cachePath($filePath);
     }
     return $filePath;
 }