Questions tagged [foshttpcachebundle]

7 questions
11
votes
4 answers

Symfony 3.4 http cache , always Cache-Control: max-age=0, must-revalidate, private

I try in annotation * @Cache(expires="+10 hours", public=false) or in controller $maxAge =…
Developer
  • 2,731
  • 2
  • 41
  • 71
10
votes
1 answer

How to make Cache Tagging work with FOSHttpCacheBundle and Varnish?

I configured Symfony and FOSHttpCacheBundle (following the Varnish configuration instructions in the FOSHttpCache documentation). I added an action to my controller that adds a test tag in the response HTTP header:
Michaël Perrin
  • 5,903
  • 5
  • 40
  • 65
8
votes
4 answers

Pass cookie to CloudFront origin but prevent from caching

I am using CloudFront as cache in front of my Symfony web application. To get a cache based on a user's role (admin, customer,...) I generate a user role based hash in a Lambda@Edge Viewer Request trigger. I pass that hash on as a request header to…
5
votes
0 answers

How to set Cache-Control to no-cache in Symfony - FOSHttpCacheBundle

Problem: Hitting back button in browser renders the cached version of the secure page even after logout. I'm trying to solve this using FOSHttpCacheBundle. Here is my config: fos_http_cache: cache_control: defaults: overwrite: true …
2
votes
1 answer

FOSHttpCacheBundle cache invalidation with Symfony built-in reverse proxy doesn't work

I'm trying to do a hard thing: implementing cache invalidation with Symfony 4.4.13 using FOSHttpCacheBundle 2.9.0 and built-in Symfony reverse proxy. Unfortunately, I can't use other caching solution (like Varnish or Nginx) because my hosting…
1
vote
1 answer

FOSHttpCache with Symfony reverse proxy

So I'm trying to configure the FOSHttpCacheBundle (latest release ^2.0) with the default Symfony HttpCache. Here is the content of my AppCache.php according to the docs:
SebScoFr
  • 881
  • 1
  • 9
  • 24
0
votes
2 answers

How can I clear the cache of the frontend in my Smfony controller?

I would like to clear the website cache of my frontend whenever I make an update of a page in the backend. This is my approach: use FOS\HttpCacheBundle\CacheManager; class ProjectController extends AbstractRestController { private CacheManager…
peace_love
  • 6,229
  • 11
  • 69
  • 157