php noob - simple cache fix?

Hi! We got a custom php calendar for apartment reservations…its working fine but sometimes when I/clients visit the website the calander shows weeks available when they are reserved.
This seems to be a caching/memory problem, I have tried to add:

<meta http-equiv="expires" content="Sun, 01 Jan 2014 00:00:00 GMT"/>
<meta http-equiv="pragma" content="no-cache" />

in the html header but the problem still exists; is there a quick fix for this problem? You can see the site in action at: https://oostendezeedijkcentraal.be/

Hope someone is able to make me happy with an idea on how to fix this problem.

cheers

Does clearing the cache and refreshing the page display the data correctly?

Thanks for your reply! Yes that works but it needs to be updated automatic for everybody. We don’t want returning visitors to try and make a reservation for dates which are not available.

Gotcha! Add these three lines and see if that fixes it:

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>

Do you have a CDN associated with the page that may be adding additional caching?

Cheers,
Kirupa

I have implemented it, hope this fixes the problem.

thank you so much :pray:

1 Like

Good luck! Reply back if it isn’t working, and we can try some alternate solutions :grinning:

please use WordPress plugin simple cache fix