litespeedtech / lscache_wp

LiteSpeed Cache for WordPress
http://wordpress.org/plugins/litespeed-cache/
GNU General Public License v3.0
217 stars 109 forks source link

There is no way to opt out cache via Request Headers #732

Open daguitosama opened 2 months ago

daguitosama commented 2 months ago

Hi, I recently hit an issue with LittleSpeed Cache. It was overwriting a REST API call response, and giving back a cache version even if the request was made with headers asking for a no cache version like: Cache-Control: "no-cache" and Pragma: "no-cache". I fix it by disabling REST Cache on settings of the plugin, but wanted to ask if this is the intended behaviour.

timotei-litespeed commented 2 months ago

@daguitosama There is this setting: https://docs.litespeedtech.com/lscache/lscwp/cache/#cache-rest-api Will it help if you disable this setting?

seb86 commented 2 months ago

Yes, disabling helps but I think what we would like is a little more control on which REST API's that we cache or detection of the header conditions a REST API endpoint sets as to prevent caching if need be.

timotei-litespeed commented 2 months ago

There is this setting: https://docs.litespeedtech.com/lscache/lscwp/cache/#do-not-cache-uris Also under there are other options that can help