一連の処理の中で複数の生存期間を使い分ける必要があり、こんな事をやっていたのだけどどうも上手く動かない。 $cache = new Cache_Lite(array('lifeTime' => null, 'automaticSerialization' => true)); if($data = $cache->get($cacheKeyData)): return $data; else: $data = array(); foreach($this->getFromDB() as $id): $post = $cache->get($cacheKeyPost) if(!$post): $post = $this->getPostById($id); $cache->setLifeTime(null); $cache->save($post, $cacheKeyPost); endif