public function getSubscribedEvents()
{
$options = $this->app['config']['doctrine_cache'];
$clearCache = $options['result_cache']['clear_cache'];
if ($clearCache) {
return array(Events::postPersist, Events::postRemove, Events::postUpdate);
}
// キャッシュの削除オプションが無効の場合は、イベントを定義せず空の配列を返す.
return array();
}