mistval / node-fetch-cache

Node-fetch with built-in response caching.
MIT License
51 stars 8 forks source link

How to fetch cached result manually #25

Closed ZeyoYT closed 1 year ago

ZeyoYT commented 1 year ago

is there a way to fetch data manually from cached responses, i have a rest api binded to my discord bot , so if the bot is down the rest api goes down , the rest api contains data like commands , categories of commands , help of commands , etc etc , now when the vps is down for maintenance or if i am updating the bot , or for some cause the server is down i want to manually serve the cached response of my rest api , is it possible ?

mistval commented 1 year ago

I don't think this package will help you with that, if I understand your goal, because this package's purpose is caching to reduce HTTP requests, not as a backup cache to serve content when the source is unavailable.