wodby / varnish

Varnish docker container image
https://wodby.com/stacks/varnish
MIT License
59 stars 29 forks source link

Drupal preset - cache public static files for authenticated users. #27

Open drasgardian opened 3 years ago

drasgardian commented 3 years ago

The changes in #24 have disabled caching of all static files for authenticated users.

While it is good that Drupal private files (/system/files/*) should not be cached for authenticated users, there are lots of other static files that should still be safe candidates to cache. e.g. public files, css, js, images included in theme or module folders etc.

esolitos commented 3 years ago

I believe there's no need to cache such files in varnish. If you use nginx you can configure it to keep a "open files cache", which is as performant as Varnish in delivering static files.