lisaogren / axios-cache-adapter

Caching adapter for axios. Store request results in a configurable store to prevent unneeded network requests.
MIT License
725 stars 108 forks source link

fix(limit): invalidate oldest cache when reaching limit size #248

Open zhenwenc opened 3 years ago

zhenwenc commented 3 years ago

When the number of cached requests reaches the configured limit, the oldest cached item should be removed from the store.

247

codecov[bot] commented 3 years ago

Codecov Report

Merging #248 (4d16e29) into master (2d51cee) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #248   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          235       238    +3     
=========================================
+ Hits           235       238    +3     
Impacted Files Coverage Δ
src/memory.js 100.00% <100.00%> (ø)
src/redis.js 100.00% <100.00%> (ø)
src/serialize.js 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2d51cee...4d16e29. Read the comment docs.

cowboy-bebug commented 2 years ago

cc @RasCarlito