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

Fix missing NoAutoCacheControl when vary on contex hash is set from Response #485

Merged

Conversation

andrerom
Copy link
Contributor

@andrerom andrerom commented Oct 1, 2018

This moves logic to set NoAutoCacheControl so it is always executed if
vary header exists, now also when that is the case from response already.

Also adds unit test coverage for this feature.

This moves logic to set NoAutoCacheControl so it is always executed if
vary header exists, now also when that is the case from response already.
@andrerom
Copy link
Contributor Author

andrerom commented Oct 1, 2018

@dbu I was trying to debug why I was not getting cached pages when having session, and found this in condition where you specify vary header yourself (both with always_vary_on_context_hash enabled and not).

Hope this is the right fix, if accepted it would be good to do a release to avoid issues for people upgrading to Symfony 4.1.

@andrerom andrerom changed the title Fix missing NoAutoCacheControl when custom vary on contex hash is set Fix missing NoAutoCacheControl when vary on contex hash is set from response Oct 1, 2018
@andrerom andrerom changed the title Fix missing NoAutoCacheControl when vary on contex hash is set from response Fix missing NoAutoCacheControl when vary on contex hash is set from Response Oct 1, 2018
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks a lot!

@dbu dbu merged commit ea729d8 into FriendsOfSymfony:master Oct 1, 2018
@dbu
Copy link
Contributor

dbu commented Oct 1, 2018

i will tag a bugfix release now.

oh, btw: it would be great if you could add changelog entries for such pull requests. i will go and add changelog entries for the things already merged.

@andrerom
Copy link
Contributor Author

andrerom commented Oct 1, 2018

oh, btw: it would be great if you could add changelog entries for such pull requests. i will go and add changelog entries for the things already merged.

ok, I'll do that next time ;)

Maybe add a PR template with TODO elements to make it more clear btw?

@andrerom andrerom deleted the fix_no_auto_cache_when_custom_header branch October 1, 2018 14:19
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

Successfully merging this pull request may close these issues.

None yet

2 participants