BytewaveMLP / node-derpi

A (WIP) Derpibooru API wrapper for Node.js
MIT License
7 stars 2 forks source link

Caching #3

Open BytewaveMLP opened 6 years ago

BytewaveMLP commented 6 years ago

Global request caching is still an important feature to add. I think it would be relatively easy to do, as most HTTP fetching is routed through Fetch anyway.

The question is, do I want this to be done in memory or on disk, or a combination of the two? Should it be user-configurable?

BytewaveMLP commented 6 years ago

Apparently it's really hard to find good HTTP caching libraries for request. Hmm. I really don't want to have to write my own, but if that's what it comes to, so be it.

BytewaveMLP commented 6 years ago

https://www.npmjs.com/package/cacheable-request https://nodejs.org/api/http.html#http_http_request_options_callback https://nodejs.org/api/querystring.html

BytewaveMLP commented 5 years ago

https://github.com/sindresorhus/got is this the answer? find out next episode!

nullforce commented 4 years ago

As a side note, request/request has been deprecated as of Feb 11, 2020. got looks interesting.