龍巖易富通網(wǎng)絡(luò)科技有限公司

龍巖小程序開發(fā),龍巖分銷系統(tǒng)

smarty緩存操作

2015.09.10 | 545閱讀 | 0條評(píng)論 | 未命名

smarty緩存的配置 $smarty->cache_dir = "/caches/";? //緩存目錄 $smarty->caching = true;?????????? //開啟緩存 $smarty->cache_lifetime = 60;???? //緩存時(shí)間,單位秒 //你可以給不同的模板設(shè)置不同的緩存過期時(shí)間,一個(gè)lifetime,一個(gè)display。 smarty緩存的使用和清除 $smarty->display(‘cache.htm’,cache_id); //創(chuàng)建帶ID的緩存 $smarty->clear_all_cache(); //清除所有緩存 $smarty->clear_cache(‘index.htm’); //清除index.htm的緩存 $smarty->clear_cache(‘index.htm’,cache_id); //清除指定id的緩存

贊 (

發(fā)表評(píng)論