一直没有去研究phpcms 的getcache()函数是干嘛的,今天有空去看了一下,原来就那样。

 1 function getcache($name, $filepath='', $type='file', $config='') {
 2     pc_base::load_sys_class('cache_factory','',0);
 3     if($config) {
 4         $cacheconfig = pc_base::load_config('cache');
 5         $cache = cache_factory::get_instance($cacheconfig)->get_cache($config);
 6     } else {
 7         $cache = cache_factory::get_instance()->get_cache($type);
 8     }
 9     return $cache->get($name, '', '', $filepath);
10 }

getcache()就是获取缓存数据的,

例如:

getcache('common','commons');就是获取caches/caches_commons/cache_data/comon.cache.php的数据

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
猜你喜欢
  • 2022-12-23
  • 2021-07-18
  • 2021-06-14
  • 2021-12-29
  • 2021-10-05
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案