php缓存:PHP缓存Cache详谈

大家会问什么是SMARTY缓存Cache:

< ?php require('./smarty/Smarty..php'); $smarty = Smarty; Z) $smarty->caching = true; (!$smarty->is_cached('index.tpl')) // No cache available, do variable assignments here. ) $contents = get_database_contents; $smarty->assign($contents); } $smarty->display('index.tpl'); ) ?>



这个首先判断是否有这个缓存Cache文件!没有直接链接数据库!有话!执行DISPLAY就是读取缓存Cache大家看到上面2个例子!对缓存Cache有很大理解了吧!

TAG: PHP 缓存Cache


Tags:  php缓存实现 php缓存技术 php页面缓存 php缓存

延伸阅读

最新评论

发表评论