weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
2.05k stars 200 forks source link

How to disable cache #404

Closed MistyMeteor closed 8 months ago

MistyMeteor commented 10 months ago

The setting of the cache control parameter can only range from 1d (1 day) to 1y (1 year). When I set it to 0d, the return value is default value one year. How can I change cache-control HTTP-header to no cache, to disable cache?

kleisauke commented 10 months ago

Hello, did you see https://github.com/weserv/images/issues/292#issuecomment-873653028?

We don't want to have shorter max-ages than 1 day, as it would be unfeasible to host the free service without any caching.

kleisauke commented 8 months ago

I hope this information helped. Please feel free to re-open if questions remain.