2010-09-30 60 views

回答

0

这是in the constructor to cache_lite

只需设置hashedDirectoryLevel选项....

$cache = new Cache_Lite(array('hashedDirectoryLevel' => 2)); 
+0

问题...如果我用这个$的cache> setLifeTime(300); $ cache-> save($ somedata,'key1'); $的cache> setLifeTime(10000); $ cache-> save($ anotherdata,'key2'); $的cache> setLifeTime(300); $ cache-> save($ somedata,'key3'); cache_lite会为每个数据项设置单独的生命周期吗? – Jason 2010-09-30 19:55:02

+0

查看源代码后,在垃圾收集或读取时使用生命周期。所以不,你不能在每个关键的基础上调整生命周期(当然,你可以阅读,但不能用于gc)...... – ircmaxell 2010-09-30 20:33:25