2012年6月4日月曜日

Cache_Liteのディレクトリ指定が効かない

        require_once('Cache/Lite.php');
        $option = array(
            'CacheDir' => $dir,
            'LifeTime' => $lifetime,
            'AutomaticCleaningFactor' => $factor
            );
        $this->cache = new Cache_Lite($option);
$optionをダンプするとちゃんと設定されているようだけど、実際には/tmp/に作成されてる。
array(3) {
  ["CacheDir"]=>
  string(52) "/var/www/html/blog/wp-content/themes/lumiukko/cache/"
  ["LifeTime"]=>
  int(3600)
  ["AutomaticCleaningFactor"]=>
  int(100)
}
原因判明。。。オプション名の先頭は小文字が正解。
        $option = array(
            'cacheDir' => $dir,
            'lifeTime' => $lifetime,
            'automaticCleaningFactor' => $factor
            );

0 件のコメント:

コメントを投稿