なんでググらないの?または、knpbundles.comを見て、「キャッシュ」を検索してください。
http://knpbundles.com/search?q=キャッシュ
多分これはあなたのニーズに合ったものです:
https://github.com/winzou/CacheBundle
使用法:
$cache = $this->get('winzou_cache.apc');
// or
$cache = $this->get('winzou_cache.file');
// or
$cache = $this->get('winzou_cache.memcache');
// or
$cache = $this->get('winzou_cache.array');
// or
$cache = $this->get('winzou_cache.xcache');
// or
$cache = $this->get('winzou_cache.zenddata');
// or
$cache = $this->get('winzou_cache'); // in that case, it will use the default driver defined in config.yml, see below
$cache->save('bar', array('foo', 'bar'));
if ($cache->contains('bar')) {
$bar = $cache->fetch('bar');
}
$cache->delete('bar');
編集:
これにセッションを使用するのは得策ではありません。セッションはユーザーごとであり、キャッシュされた値は共有できません。また、セッションを使用するときは、シリアライゼーションや、複雑なオブジェクトをセッションに保存するときに発生する可能性のあるその他の問題について考える必要があります。