My websites are caching the REST requests. I am happy with the speed of the websites and would like to retain the cache. However, I have discovered that the same file is returned after I have made a POST/PUT/DELETE request. This means that the updated database isn't called. The same happens after refreshing the page. I would like to have updated information from the database after a POST/PUT/DELETE request.
I am just wondering if I can maybe set a conditional statement to cache the files if the last REST request isn't POST/PUT/DELETE? The website is hosted on a shared web hosting platform and I can amend the .htaccess file. Greatly appreciated for any ideas. I hope my explanation is clear but please feel free to reach out if it's not. Thank you in advance