0
votes

I'm using Processwire as CMS and I like to user Varnish as cache backend for pages.

I can't find a default.vcl ready for Processwire (I used Varnish with Drupal) and I can't cache my pages.

I see that the page has this header:

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

Every page is missed from Varnish, and age is obviosuly 0.

Processwire doesn't have options to set these headers. Some ideas?

1

1 Answers

2
votes

You're right in that ProcessWire doesn't provide a GUI, setting, etc. to configure headers -- you're expected to set them manually by modifying the .htaccess file, or at template file / module level using PHP's header(). For cache control the .htaccess method usually makes more sense.

Note that ProcessWire itself doesn't set these headers either; what you're seeing there are just default values set by PHP when session_start() is called.