Hello @joneiseman,
The file-based cache creates an HTML version of each page and stores it as a file for better and faster delivery. We do not serve cached content to any request that includes COOKIE of any sort, thus logged-in users would not receive a cached response from the server/application. The behavior you mention is not something that should occur. Can you give us steps to recreate the issue in question?
Best Regards,
Simeon Boev
Hi Simeon,
I can’t give you steps to recreate the issue because it doesn’t happen every time. On my website the version of some pages is different depending on whether or not you are logged in. Sometimes after logging in the version of the page is the non-logged in version instead of the logged in version. Refreshing the page will then get the logged in version of the page. So, I think the problem is on the server side that it’s returning the cached version of the page after login and then refreshing the page gets the non cached version of the page from the server.
The File Caching changes the http request header. With the File caching turned on it has the following in the request header (when I’m not logged in):
cache-control: max-age=0
Without the File caching it has the following in the request header:
cache-control: no-cache
In the response header when not logged in I see the following:
sg-f-cache: HIT
I don’t see this when logged in and get the non cached page. I don’t know what it shows in the case when I’m logged in (but get the cached page) but I suspect it would show the sg-f-cache entry in the response header.
The server should always return the non-cached page when the user is logged in (since I didn’t turn on caching for logged in users).
Best Regards,
Jon
Hello Jon,
I tried to recreate the issue on my end on a default WordPress installation, but the headers I get back when the File cache is turned on/off in both cases is cache-control: no-cache.
It will be easier to check this by trying to recreate the issue. If your site is hosted with Siteground, we can prevent it. It is against the forum rules to provide any details etc. Thus, please submit a ticket to us with a description of the problem and how to recreate it. We can check it on the site or a staging copy and try to determine what might be causing it.
Hello @joneiseman,
We haven’t heard back from you in the past couple of days and we will be marking the topic as Resolved. You will still be able to post new replies, in case there are any further details that you can share.
We remain available over the SiteGround’s Support HelpDesk as well.
Best Regards,
Gergana Petrova