next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

What are the Drupal cache recommendations?

Open hanoii opened this issue 2 years ago • 2 comments

What kind of caching should we aim to have set on Drupal? Does it make sense to have page cache? Does it make sense to have Dynamic cache?

What about this on top of upstream caches? I am thinking of disabling everything to start with, just wondering what would be the recommended approach.

Related to #246

hanoii avatar Jan 17 '23 03:01 hanoii

Depends on how you're using the Drupal backend. The Drupal cache config does not affect the Next.js site (since JSON:API takes care of revalidating entity caches).

I use the Drupal backend mostly for editors (so authenticated sessions) but I generally always keep the page and dynamic caches on.

shadcn avatar Jan 17 '23 06:01 shadcn

Chiming in: I've been testing with a stack using memcache (hold Drupal's render, dynamic page cache, etc. But no page_cache) and Varnish (alongside Purge module) and everything has been OK so far. If your Next.js app is configured with authentication using Authorization it'll end up bypassing Varnish anyway and only leveraging dynamic page cache.

mglaman avatar Dec 07 '23 21:12 mglaman