Exemplo n.º 1
0
 /**
  * 加载缓存对象
  * @param string $moduleName                               缓存模块名称
  * @param string|ZOL_DAL_ICacheKey $cacheParam 缓存键值对,或采用的键值算法。如果只是键值对,
  *                                                         系统会自动采用默认算法引擎
  * @param integer                                          调用数量
  */
 public function loadCacheObject($moduleName, $cacheParam = null, $num = 0)
 {
     $data = self::$_manager->getCacheObject($moduleName, $cacheParam, $num);
     if (empty(self::$_loadedCacheModules[$moduleName])) {
         self::$_loadedCacheModules[$moduleName]['count'] = 0;
     }
     self::$_loadedCacheModules[$moduleName]['count']++;
     self::$_loadedCacheModules[$moduleName]['param'] = $cacheParam;
     self::$_loadedCacheModules[$moduleName]['key'] = self::$_manager->getCacheKey();
     return $data;
 }
Exemplo n.º 2
0
 /**
  * 加载缓存对象
  * @param string $moduleName                               缓存模块名称
  * @param string|ZOL_DAL_ICacheKey $cacheParam 缓存键值对,或采用的键值算法。如果只是键值对,
  *                                                         系统会自动采用默认算法引擎
  */
 public function loadCacheObject($moduleName, $cacheParam = array(), $num = 0)
 {
     return self::$manager->getCacheObject($moduleName, $cacheParam);
 }