/** * 获取缓存对象返回数组 文件缓存的话,目录结构:Cache/$moduleName/$cacheKey{0,1}/$cacheKey{2,3}/$cacheKey.php * @param string $moduleName 缓存模块名称 * @param array|string|ZOL_DAL_ICacheKey $cacheParam 缓存参数 * @param integer $num 数量 */ public function getCacheObject($moduleName, $cacheParam = null, $num = 0) { $cacheModule = $this->getCacheModuleObj($moduleName); if (!($cacheModule && $cacheModule instanceof ZOL_DAL_ICacheModule)) { return false; } $data = $cacheModule->get($cacheParam); if (is_array($data) && $num > 0) { $data = array_slice($data, 0, $num, true); } self::$cacheKey = $cacheModule->getCacheKey(); return $data; }
public function __construct() { self::$manager = ZOL_DAL_BaseCacheManager::getInstance(); }