Skip to content

Conversation

@davidyang
Copy link

Hey @craftapi - I haven't coded PHP in years so this is probably not how to do it but I wanted to add a fix so that a user could set a page to not cache using headers.

@davidyang
Copy link
Author

If you accept something like this I can also add some documentation around it.

@davidyang davidyang mentioned this pull request Mar 29, 2017
@Ottergoose
Copy link

It's worth noting that this fix is mostly going to work on account of using No-Cache" (with upper "N" and "C") vs. the default "no-cache" that my dev and production servers were both already sending (and I'm not the only one, apparently - see discussion of session_cache_limiter() here: https://craftcms.stackexchange.com/questions/2598/why-does-craft-set-no-cache-headers-for-all-requests )

Having done a bit of digging, the RFC makes no mention of case sensitivity, but Mozilla is explicitly cool with directives being case-insensitive, however, not all software (such as this change) can be relied on to perform a case-insensitive comparison, so, best practice is probably to use all lower-case.

So, in theory this could work, however, it should be updated to be case-insensitive, and, once that happens, it'll effectively prevent this plugin from working with a default (if not optimal) PHP config, and cause headaches for anyone attempting to support it.

TL;DR: fixing this so it isn't case sensitive would effectively break the plugin on default PHP configs.

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.

2 participants