smarty与php缓存的操作
来源:互联网 发布:淘宝卖家代销流程图 编辑:程序博客网 时间:2024/05/16 15:43
1)使用缓存
要开启smarty的缓存,只需将caching设为true,并指定cache_dir即可。使用cache_lefetime指定缓存生存时间,单位为秒
2)清楚缓存
Clear_all_cache();//清除所有缓存
Clear_cache(“index.tpl”);//清除index.tpl的缓存
Clear_cacache(“index.tpl”,cache_id);//清除指定id的缓存
3)使用自定义缓存方式
$smarty->cache_handler_func使用自定的函数处理缓存
$smarty->cache_hander_func=”myCache”;
FunctionmyCache($action,&$smarty_obj,&$cache_content,$tpl_file=null,$cache_id=null,$complie_id=null){
Switch($action){
Case “read”;//读取缓存内容
Case “write”;//写入缓存内容
Case “clear”;
}
- smarty与php缓存的操作
- php+Smarty的缓存操作
- php,smarty 缓存操作
- php,smarty 缓存操作
- Smarty的缓存操作
- php+smarty ,smarty 缓存
- Smarty的缓存操作技巧
- Smarty的缓存操作技巧
- Smarty的缓存操作技巧
- Smarty的缓存操作技巧
- Smarty的缓存操作技巧
- Smarty的缓存操作技巧
- Smarty的缓存与应用
- php运用smarty缓存的全面剖析
- php文件缓存smarty模板的应用
- 精炼的Smarty缓存操作技巧
- smarty缓存操作方面的一些技巧
- php smarty 缓存
- DataGridView取消默认选中行
- JQuery 学习笔记
- Window iframe
- 验证邮箱是否真实存在 c#
- 非常值得看的一篇文章—HP大中华区总裁孙振耀退休感言
- smarty与php缓存的操作
- Const,Const函数,Const变量,函数后面的Const
- 屏蔽回车键提交功能
- MySQL存储过程详解(实用)
- 不可能解开的谜题
- smarty自定义函数
- Xcode4.2生成app支持旧版iOS设备
- 链表的建立、插入和删除
- 磁盘类型转换(fat转换ntfs)