apicache icon indicating copy to clipboard operation
apicache copied to clipboard

cache-control global options not working correctly

Open springyboy opened this issue 3 years ago • 2 comments

Hi,

Is there a bug in the newly implement global options for cache-control?

It looks like the method sendCachedResponse (apicache.js 258) does not check the global options for the header cache-control and writes a new cache-control header with a reduced max-age. This causes the browser to cache the response from the api even if the global option cache-control is specified as no-cache.

I could be wrong.

springyboy avatar May 24 '21 12:05 springyboy

You might want to look at #205. It looks like this package is losing support but there's a fork of this package with this improvement.

Izook avatar May 24 '21 22:05 Izook

This seems to be a defect. It's happening for us too.

ravinatesanatr avatar Jul 20 '22 05:07 ravinatesanatr