Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Cache #340

Open
obernado opened this issue Nov 22, 2022 · 1 comment
Open

No Cache #340

obernado opened this issue Nov 22, 2022 · 1 comment

Comments

@obernado
Copy link

I'm not sure why but Symfony is not caching the calls to translations.
Modifying the http_cache_time parameters seems to have no effect.
Could it be that when building the response on getTranslationsAction this line should be added?
$response->headers->set(AbstractSessionListener::NO_AUTO_CACHE_CONTROL_HEADER, 'true');
https://symfony.com/doc/current/http_cache.html#http-caching-and-user-sessions
I can make a PR with that if its okay.

I read the related issue #297 but didn't work.

@stof
Copy link
Contributor

stof commented Dec 18, 2023

Make sure your stateful firewall is not active on the path of the translations, so that the security system does not use the session on those URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants