Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
cache_page123123qd22.png | 10.18 KB | ricardoamaro |
Comments
Comment #1
ricardoamaro CreditAttribution: ricardoamaro commentedComment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI 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.
Comment #3
nnewton CreditAttribution: nnewton commentedWe 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
Comment #4
drummYep, that seems likely.
So, is it recommended for us to leave the Drupal page cache off, or should it be turned on?
Comment #5
basic CreditAttribution: basic commentedI 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?
Comment #6
drummSounds 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.
Comment #7
drummSee #2125951: Implement hook_node_delete() to clear forum block cache when forum topic is being deleted. for block cache issues.
Comment #8
ricardoamaro CreditAttribution: ricardoamaro commentedIs memcache module upgraded already?
Comment #9
basic CreditAttribution: basic commentedTo 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
Comment #10
tvn CreditAttribution: tvn commentedBack to active since Memcache has been upgraded.
Comment #11
Damien Tournoud CreditAttribution: Damien Tournoud commentedSet this to zero. This feature should really not be used, ever.
Comment #12
drummEven 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.
Comment #13
basic CreditAttribution: basic commented@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?
Comment #14
nnewton CreditAttribution: nnewton commentedThese 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
Comment #15
basic CreditAttribution: basic commentedCurrent proposal is:
Cache pages for anonymous users: true
Cache blocks: true
Minimum cache lifetime: none
Expiration of cached pages: 15 minutes
Comment #16
drummI believe we fixed this. From production:
block_cache: 1
cache: 1
cache_lifetime: "900"
Comment #17
Damien Tournoud CreditAttribution: Damien Tournoud commented@drumm: that looks backwards.
You would expect:
Comment #18
basic CreditAttribution: basic commentedThese 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:
Drupal.org still needs to be updated.
Comment #19
Damien Tournoud CreditAttribution: Damien Tournoud commented@basic: so we still don't want the CDN do to any caching?
I assume the
Cache-Control
header is forced by Varnish?Comment #20
basic CreditAttribution: basic commented@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.
Comment #21
basic CreditAttribution: basic commentedDrupal.org now has the following values:
I'm guessing page_cache_max_age is a pressflow thing?
Comment #22
basic CreditAttribution: basic commented