2

In our production server, we wrongly set page_cache_maximum_age a long value,

$conf['page_cache_maximum_age'] = 12960000;

Now viewers are complaining they are seeing old contents in there homepage.

I am able to see new contents with a force reload (CTRL + F5).

Is there any way to force the client side to refresh the pages in this stage?

We have our architecture Drupal+Nginx+Varnish and CloudFlare on top of it.

1

Either you don't need, or you can't:

If this was translated to HTTP header, and browser "knows" not to ask for the page again, nothing you would try to do about it will have any effect, because browser simply won't contact your server anyway, so it will not download any remedy you might try.

If it affected only server-side systems, tuning it down and clearing caches should be enough already, and server shouldn't send "304 Not Modified" to your clients.

Hard to tell which case is it without knowing your caching setup, but I'm afraid "fix it and wait" is the only way either way.

Unless, for some reason, you can identify uncached JS file included on affected pages. This would be a bug, so I don't expect it to happen, but if, it might be a bug you could use - ask for it on Stack Overflow, then, as this is much less Drupal-related.

If your front page isn't cached that way, you can alter all affected links. It will not help people having issues with bookmarked pages, but it will direct regular users to current content.

| improve this answer | |
  • Actually I was meant to set max expiry for varnish when Drupal serve the content to varnish. From varnish to user end the max age should be normal or 0, so that selective cache purge will works efficiently. But due to a mistake in varnish vlc it passed the same header to clients. – shameem Oct 7 '15 at 11:31
  • @shameem so it's the first case - you can't affect user agent behavior if user agent does not contact you at all. – Mołot Oct 7 '15 at 11:36
  • yes I understood. :( but we are out of choices that's how I end up here. – shameem Oct 7 '15 at 12:19
0

You might want to flush the entire cache for now with

varnishadm "ban req.url ~ /"

found this at https://www.varnish-cache.org/forum/topic/696 OR

 set req.hash_always_miss = true;

What you are looking for is to miss as stated on https://www.varnish-software.com/book/3/VCL_functions.html and the easiest way is to force the requested cache to not be present

simpeler explaination: enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.