tags:

views:

16

answers:

1

I read documentation of cache_lite but couldn't found any option regarding to manage cache files into several subdirectories. Is there any addon available for that?

A: 

It's in the constructor to cache_lite:

Just set the hashedDirectoryLevel option....

$cache = new Cache_Lite(array('hashedDirectoryLevel' => 2));
ircmaxell
Question... if I use this $cache->setLifeTime(300); $cache->save($somedata, 'key1'); $cache->setLifeTime(10000); $cache->save($anotherdata, 'key2'); $cache->setLifeTime(300); $cache->save($somedata, 'key3'); will cache_lite treat set individual lifetime for each data item?
Jason
After looking at the source, lifetime is used when garbage collected or read. So no, you can't adjust the lifetime on a per key basis (well, you could for reading, but not for gc)...
ircmaxell