Hello everyone,
I am playing around with Varnish on a MODX installation and have a few questions about how MODX handles sessions and logged in users.
If I turn off sessions on my web context (using: session_enabled=0) I can see this is being served by Varnish successfully as no session is being created.
If I leave it on, I can see that MODX is setting the following headers:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
This prevents Varnish from caching the page as it thinks it is different for each user. I know Varnish also won't cache if it sees cookies but this is something I can control in the Varnish settings.
The problem I have is that 90% of the site is static apart from something like /members/*
I would like to be able to set rules that mean certain locations are not cache in the Varnish settings which should be no problem.
Is there a way of telling MODX not to create a session until the user logs in?
I would be really interested to see how everyone else is using Varnish and get some pointers.
Thanks,