I am having problems getting my ExpressionEngine website to cache on Cloudflare.
I am running: - ExpressionEngine 2.11.7 - PHP 5.4 / MySQL 5.5 - IIS 7.0.
Let me run through steps I am taking:
- On Cloudflare, I have the rule .domain.com/ to be cached i.e. everything is being cached.
- After doing curl -I on https://www.domain.com/ I noticed the response was coming back with cf-cache-status: MISS. I then tried https://www.domain.com/page/ and I got the same response. /page/ is a template created inside ExpressionEngine.
- If I create a test page https://www.domain.com/cachetest.php i.e. not ExpressionEngine, it caches that page absolutely fine. So it isn't an IIS configuration, and it isn't the web server, or otherwise I would expect that page not to cache.
- my web.config file strips out index.php, which I thought might have caused the issue, but I have tried with and without that rule but still not working.
- I have checked over my output caching in IIS and although caching is enabled, there are no rules. As a 'to be sure', I disabled caching to test again.
Am I missing something? Is there a setting that could be preventing Cloudflare to cache the website for some reason? I have no issues with Wordpress sites using Cloudflares cache, using the same settings.
Thanks in advance,
EDIT I've just found this on the Cloudflares support page (https://support.cloudflare.com/hc/en-us/articles/202775670-How-Do-I-Tell-Cloudflare-What-to-Cache-):
or if there is a cookie in the response, then Cloudflare will not cache the resource.
If I look at the response in Curl, well we see the exp_last_visit, exp_last_activity, exp_tracker, exp_csrf_token cookies in the response headers.
So does this mean we cannot use ExpressionEngine with Cloudflare?