These are the current values on drupal.org:

block_cache: "1"
cache: "3"
cache_clear: "7200"
cache_lifetime: "900"

Shouldn't we set a maximum life time and enable for anonymous users?

CommentFileSizeAuthor
cache_page123123qd22.png10.18 KBricardoamaro
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ricardoamaro’s picture

Issue summary: View changes
killes@www.drop.org’s picture

I think we have disabled anonymous cache due to our use of varnish. There's no need to cache them in memcached too. Please confirm with nnewton.

nnewton’s picture

We are going to need drumm to comment on this. To me this looks like these values were never updated after the D7 upgrade. cache being '3' looks like Pressflow's CACHE_EXTERNAL to me. This isn't hugely impacting us because our cache logic is coded into the VCL, but this needs to be fixed/headers set correctly (max-age) before the CDN integration.

-N

drumm’s picture

Yep, that seems likely.

So, is it recommended for us to leave the Drupal page cache off, or should it be turned on?

basic’s picture

I believe cache pages for anonymous users can be enabled. We should set the expiration of cached pages to whatever it was for D6, probably 15 minutes?

drumm’s picture

Status: Active » Postponed

Sounds good, but let's upgrade our Memcache module first. With the past field cache inconsistency, it is in DB now, and the variables cache inconsistency that I see, I don't feel like I trust Memcache enough for a new cache that we won't notice working incorrectly.

ricardoamaro’s picture

Is memcache module upgraded already?

basic’s picture

To match the other Drupal.org sites, we should set:

Cache pages for anonymous users: true
Cache blocks: true

Minimum cache lifetime: 15 minutes
Expiration of cached pages: none

Memcache has been upgraded but we are still seeing some issues related to it with block caching

tvn’s picture

Status: Postponed » Active

Back to active since Memcache has been upgraded.

Damien Tournoud’s picture

Minimum cache lifetime: 15 minutes

Set this to zero. This feature should really not be used, ever.

drumm’s picture

Status: Active » Postponed

Even with the upgrade, the block cache is still showing symptoms of being inconsistent, see #2125951: Implement hook_node_delete() to clear forum block cache when forum topic is being deleted. and #2147745: Updating book page does not invalidate book nav block. Until those are solved, nothing new should be backed by MemCache.

basic’s picture

@Damien

It looks like these values weren't reviewed from D6->D7. Perhaps this is where the 15 minutes value came from? What would you recommend setting here with Memcache in D7?

nnewton’s picture

These days I'd agree with Damien, since I was mainly concerned with that setting re the page cache before and there are other options there.

So, these settings seem pretty clearly nuts and we are currently just ignoring them in Varnish. Can we just set these to sane values? It looks a lot like these were just never updated.

-N

basic’s picture

Current proposal is:

Cache pages for anonymous users: true
Cache blocks: true

Minimum cache lifetime: none
Expiration of cached pages: 15 minutes

drumm’s picture

Status: Postponed » Fixed

I believe we fixed this. From production:

block_cache: 1
cache: 1
cache_lifetime: "900"

Damien Tournoud’s picture

Status: Fixed » Needs work

@drumm: that looks backwards.

You would expect:

page_cache_maximum_age: 900
cache_lifetime: 0
basic’s picture

These settings have been applied to all relevant sub-sites. For example, https://assoc.drupal.org now gives the following response headers to an anonymous visitor:

HTTP/1.1 304 Not Modified
Accept-Ranges: bytes
Age: 895
Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0
Date: Wed, 20 Aug 2014 17:30:36 GMT
Etag: "1408554941-1"
Expires: Sat, 07 Jun 1986 00:00:00 GMT
Front-End-Https: on
Last-Modified: Wed, 20 Aug 2014 17:15:41 +0000
Link: </node/518>; rel="shortlink",</home>; rel="canonical"
Server: nginx/1.4.4
Vary: Cookie,Accept-Encoding
Via: 1.1 varnish
X-Cache: HIT
X-Cache-Hits: 9
X-Cache-Svr: www6.drupal.org
X-Drupal-Cache: MISS
X-Generator: Drupal 7 (http://drupal.org)
X-Varnish: 2111460349 2111438819

Drupal.org still needs to be updated.

Damien Tournoud’s picture

@basic: so we still don't want the CDN do to any caching?

I assume the Cache-Control header is forced by Varnish?

basic’s picture

@Damien Tournoud: right now we don't have the CDN configured to be smart about caching with/without cookies on the sites. Once we flip the switch for Drupal.org and verify the Varnish caching works as it should, I will start testing out a Rules Engine configuration for caching anonymous pages, and removing the no-cache header from our vcl.

basic’s picture

Drupal.org now has the following values:

block_cache: 1
cache: 1
page_cache_maximum_age: "300"
page_cache_max_age: "900"
cache_lifetime: "0"

I'm guessing page_cache_max_age is a pressflow thing?

basic’s picture

Status: Needs work » Fixed

Project: Drupal.org infrastructure » Drupal.org customizations
Component: Drupal.org module » Miscellaneous

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.