phpcms 缓存 cookie 分析

一.phpcms 缓存做一下笔记 以后整理

1.getcache();

例如:$sitelist  = getcache('sitelist','commons');

   就是调用caches-》caches_commons->caches_data->sitelist.cache.php

 

调用了二个文件。a.global.func.php  作用:实例化cache_factory并调用cache_factory.class.php中的get方法,get方法就是加载缓存文件    b.cache_factory.class.php     c.cache_file.class.php 里面的get函数 核心:$data = @require($filepath.$filename);

2.global.func.php

生存缓存:setcache();

$file_size = file_put_contents($filepath.$filename, $data);

 

二、cookies分析

param.class.php  set_cookie($var,$value='',$time=0)         $var变量名,$value变量值,$time=过期时间

get_cookie($var, $default = '')          $var变量名, $default 默认值  

posted @ 2012-07-12 09:48  为了这有限的生命  阅读(3122)  评论(0编辑  收藏  举报