0

I have a Drupal 7 site that is served over HTTP and HTTPS protocols using default ports (80, 443). Cache is enabled of anonymous users. However, the whole cache functionality works only for HTTP traffic. Inspecting the headers when requesting the page over HTTPS I see this:

Cache-Control →no-cache, must-revalidate, post-check=0, pre-check=0

I am using Nginx with PHP-FPM.

Any idea what might be going on here?

  • 1
    Are you logged in when testing over HTTPS? If so, drupal sends no-cache for authenticated users by default iirc. @see api.drupal.org/api/drupal/includes!bootstrap.inc/function/… "Authenticated users are always given a 'no-cache' header, and will fetch a fresh page on every request. This prevents authenticated users from seeing locally cached pages." – Beebee May 6 '16 at 9:54
  • @Beebee I am accessing the pages as anonymous user. – W.M. May 6 '16 at 10:48
  • I have used an online service (web tool) to verify the headers. There I got cache-HIT on the testing machine, so it seems the problem occurs only from my local machine, strange.. – W.M. May 6 '16 at 11:08

Your Answer

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

Browse other questions tagged or ask your own question.