cacheディレクトリのパーミッションは707等。
///
$smarty->caching = 2;
$smarty->cache_lifetime = 60;
displayの第二引数にユニーク値を入れる。
$cache_id = md5($SERVER_['REQUEST_URI']);
display(テンプレート名, $cache_id);
///
is_cached()を使ってキャッシュがある場合にDBアクセスを省略したりもできる。
http://ameblo.jp/takuya/entry-10009585143.html
http://www.phppro.jp/school/smarty/vol7/3
md5↓
http://phpspot.net/php/pgmd5%82%CC%82%A2%82%EB%82%A2%82%EB%82%C8%8Eg%82%A2%95%FB.html
smartyでキャッシュを有効にする
type Post in Smarty,
15
12月
2009
0