Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: http caching Implements bare-bones http caching as per rfc9111 Closes #3231 Closes #2760 Closes #2256 Closes #1146 Co-authored-by: Carlos Fuentes <[email protected]> Co-authored-by: Robert Nagy <[email protected]> Co-authored-by: Isak Törnros <[email protected]> Signed-off-by: flakey5 <[email protected]> * fixup! feat: http caching Signed-off-by: flakey5 <[email protected]> * fixup! fixup! feat: http caching Signed-off-by: flakey5 <[email protected]> * fixup! fixup! fixup! feat: http caching Signed-off-by: flakey5 <[email protected]> * Update lib/handler/cache-handler.js Co-authored-by: Robert Nagy <[email protected]> * Apply suggestions from code review Co-authored-by: Carlos Fuentes <[email protected]> * fixup! fixup! fixup! fixup! feat: http caching Signed-off-by: flakey5 <[email protected]> * fixup! fixup! fixup! fixup! fixup! feat: http caching Signed-off-by: flakey5 <[email protected]> * clarify type for MemoryCacheStore Signed-off-by: flakey5 <[email protected]> * Apply suggestions from code review Co-authored-by: Aras Abbasi <[email protected]> * Apply suggestions from code review Co-authored-by: Aras Abbasi <[email protected]> * tmp Signed-off-by: flakey5 <[email protected]> * fixup! tmp Signed-off-by: flakey5 <[email protected]> * Apply suggestions from code review Co-authored-by: Aras Abbasi <[email protected]> * perf things, deleteByOrigin Signed-off-by: flakey5 <[email protected]> * incredibly messy and broken impl of streaming idea Signed-off-by: flakey5 <[email protected]> * fix tests Signed-off-by: flakey5 <[email protected]> * check if the response is already cached again Signed-off-by: flakey5 <[email protected]> * backpressure patch Signed-off-by: flakey5 <[email protected]> * move body out of CacheStoreValue, remove size property Signed-off-by: flakey5 <[email protected]> * Apply suggestions from code review Co-authored-by: Robert Nagy <[email protected]> * add some comments on createWriteStream Signed-off-by: flakey5 <[email protected]> * fix type tests, make staleAt and deleteAt absolute Signed-off-by: flakey5 <[email protected]> * empty the body when overwriting the response Signed-off-by: flakey5 <[email protected]> * update onError calls Signed-off-by: flakey5 <[email protected]> * remove request deduplication for now Signed-off-by: flakey5 <[email protected]> * rename value -> opts, storedValue -> value Signed-off-by: flakey5 <[email protected]> * fix types Signed-off-by: flakey5 <[email protected]> * Apply suggestions from code review Co-authored-by: Matteo Collina <[email protected]> * simplify parsing for qualified no-cache and private Signed-off-by: flakey5 <[email protected]> * fix header omission, some cleanup Signed-off-by: flakey5 <[email protected]> * running the tests in ci is probably a good idea Signed-off-by: flakey5 <[email protected]> * fix some testing values Signed-off-by: flakey5 <[email protected]> * fixup! running the tests in ci is probably a good idea Signed-off-by: flakey5 <[email protected]> * Update lib/interceptor/cache.js Co-authored-by: Robert Nagy <[email protected]> * Update lib/util/cache.js Co-authored-by: Aras Abbasi <[email protected]> * update from reviews Signed-off-by: flakey5 <[email protected]> * Update lib/interceptor/cache.js Co-authored-by: Aras Abbasi <[email protected]> * Apply suggestions from code review Co-authored-by: Robert Nagy <[email protected]> * change from reviews Signed-off-by: flakey5 <[email protected]> * add promise support back for createReadStream Signed-off-by: flakey5 <[email protected]> * Apply suggestions from code review Co-authored-by: Robert Nagy <[email protected]> * check if onError was called Signed-off-by: flakey5 <[email protected]> * add docs Signed-off-by: flakey5 <[email protected]> * add errorCallback Signed-off-by: flakey5 <[email protected]> * Update types/cache-interceptor.d.ts Co-authored-by: Carlos Fuentes <[email protected]> * use fake timers and cleanup client Signed-off-by: flakey5 <[email protected]> * lazy cache wellknown headers Signed-off-by: flakey5 <[email protected]> * Apply suggestions from code review Co-authored-by: Aras Abbasi <[email protected]> * Update lib/cache/memory-cache-store.js Co-authored-by: Aras Abbasi <[email protected]> * code review Signed-off-by: flakey5 <[email protected]> * Apply suggestions from code review Co-authored-by: Aras Abbasi <[email protected]> * Apply suggestions from code review Co-authored-by: Aras Abbasi <[email protected]> * code review pt2 Signed-off-by: flakey5 <[email protected]> * Update lib/handler/cache-revalidation-handler.js Co-authored-by: Aras Abbasi <[email protected]> * Update lib/handler/cache-handler.js Co-authored-by: Aras Abbasi <[email protected]> * Apply suggestions from code review * fix --------- Signed-off-by: flakey5 <[email protected]> Co-authored-by: Robert Nagy <[email protected]> Co-authored-by: Carlos Fuentes <[email protected]> Co-authored-by: Aras Abbasi <[email protected]> Co-authored-by: Matteo Collina <[email protected]>
- Loading branch information