sensio/SensioFrameworkExtraBundle — Issue #66: @Cache annotation seems to not work on class configuration
Author: ricardclau
Created: 2011-10-26 11:12:11+00:00
State: open

Hi

I am trying to use HTTP Cache for some json responses and while @Cache works perfectly at method level it seems to not work at Controller Level

My code is:

'cache')));
}
}
?>

If I use * @Cache(expires="+1month") over public function cacheAction()

My headers are:

cache-control:private, must-revalidate
expires:Sat, 26 Nov 2011 12:09:23 GMT

Which is ok

However, if I use * @Cache(expires="+1month") over class TestCacheController, headers are

cache-control:no-cache
and no expires cache

I am using Symfony 2.0.4 Standard Edition, which has SensioFrameworkExtraBundle in deps.lock

SensioFrameworkExtraBundle 9b9194a47effc66b08d44ae110b982352119ca17

Any comments will be appreciated

Best regards