fawazahmed0 / exchange-api

Free Currency Exchange Rates API with 200+ Currencies & No Rate Limits
https://github.com/fawazahmed0/exchange-api#readme
Creative Commons Zero v1.0 Universal
720 stars 46 forks source link

Cache issue, browser caching data #17

Open fawazahmed0 opened 4 years ago

fawazahmed0 commented 4 years ago

Add get param to the url, to get new uncached data, adding a UTC date in param is best thing to do, as rates are updated at UTC 00:00 daily, this will make sure you get the fresh daily updated currencies

https://cdn.jsdelivr.net/npm/@fawazahmed0/currency-api@latest/v1/currencies.json?d=2024-03-06

programatically done:

const UTCDateStr = new Date().toISOString().substring(0,10)
const avoidCache = '?d='+UTCDateStr
issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.61. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

fawazahmed0 commented 2 years ago

https://developer.mozilla.org/en-US/docs/Web/API/Request/cache