axios-cache-interceptor

📬 Small and efficient cache interceptor for axios. Etag, Cache-Control, TTL, HTTP headers and more!

MIT License

Downloads
528.7K
Stars
686
Committers
35

Bot releases are visible (Hide)

axios-cache-interceptor - v0.10.3

Published by arthurfiorette over 2 years ago

Important Changes

  • Updated axios to 0.27 (#227)
  • Pass currentRequest on each access to storages (#220) (Thanks @Warxcell)

Merged

  • chore(deps-dev): bump ts-loader from 9.2.9 to 9.3.0 #228
  • chore(deps-dev): bump express from 4.18.0 to 4.18.1 in /docs #229
  • feat: updated axios to 0.27 #227
  • Pass currentRequest on each access to storages (#220) #226
  • chore(deps-dev): bump typescript from 4.6.3 to 4.6.4 #225
  • chore(deps-dev): bump ts-loader from 9.2.8 to 9.2.9 #222
  • chore(deps-dev): bump @typescript-eslint/parser from 5.20.0 to 5.21.0 #215
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #217
  • chore(deps-dev): bump express from 4.17.3 to 4.18.0 in /docs #218
  • chore(deps): bump github/codeql-action from 1 to 2 #214
  • chore(deps-dev): bump eslint from 8.13.0 to 8.14.0 #213
  • chore(deps-dev): bump tslib from 2.3.1 to 2.4.0 #212
  • chore(deps): bump async from 2.6.3 to 2.6.4 #211
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #209
  • chore(deps-dev): bump @typescript-eslint/parser from 5.19.0 to 5.20.0 #210
  • chore(deps-dev): bump prettier-plugin-jsdoc from 0.3.36 to 0.3.38 #208
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #207
  • chore(deps-dev): bump @typescript-eslint/parser from 5.18.0 to 5.19.0 #206
  • chore(deps-dev): bump eslint from 8.12.0 to 8.13.0 #205
  • chore(deps-dev): bump webpack from 5.71.0 to 5.72.0 #204
  • chore(deps): bump codecov/codecov-action from 2.1.0 to 3 #203
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #202
  • chore(deps-dev): bump @typescript-eslint/parser from 5.17.0 to 5.18.0 #201
  • chore(deps-dev): bump prettier from 2.6.1 to 2.6.2 #197
  • chore(deps-dev): bump prettier-plugin-jsdoc from 0.3.35 to 0.3.36 #199
  • chore(deps-dev): bump webpack from 5.70.0 to 5.71.0 #198
  • chore(deps-dev): bump prettier-plugin-jsdoc from 0.3.34 to 0.3.35 #196
  • chore(deps-dev): bump prettier-plugin-jsdoc from 0.3.33 to 0.3.34 #195
  • chore(deps): bump ansi-regex from 3.0.0 to 3.0.1 #194
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #192
  • chore(deps-dev): bump @typescript-eslint/parser from 5.16.0 to 5.17.0 #193
  • chore(deps-dev): bump eslint from 8.11.0 to 8.12.0 #191

Commits

  • docs: updated benchmark 9e23648
  • docs: updated docs theme 7a1ff7b
  • docs: updated download urls 8297fe2
  • docs: updated issue template 639b284
  • refactor: simpler config.cache check 55f9599

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.10.2...v0.10.3

axios-cache-interceptor - v0.10.2

Published by arthurfiorette over 2 years ago

Important Changes

  • Fixed weird TypeError: Cannot read property 'data' of undefined bug.
    Thanks @cipriandraghici93 and @himasimplisafe (again!).

Merged

  • chore(deps-dev): bump prettier from 2.6.0 to 2.6.1 #187
  • chore(deps-dev): bump prettier-plugin-jsdoc from 0.3.31 to 0.3.33 #185
  • chore(deps-dev): bump ts-jest from 27.1.3 to 27.1.4 #186
  • chore(deps-dev): bump typescript from 4.6.2 to 4.6.3 #188
  • chore(deps-dev): bump @typescript-eslint/parser from 5.15.0 to 5.16.0 #183
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #184
  • chore(deps): bump object-code from 1.2.0 to 1.2.2 #182
  • chore(deps): bump fast-defer from 1.1.5 to 1.1.7 #181
  • chore(deps): bump cache-parser from 1.2.2 to 1.2.4 #180
  • chore(deps-dev): bump prettier from 2.5.1 to 2.6.0 #178
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #175
  • chore(deps-dev): bump @typescript-eslint/parser from 5.14.0 to 5.15.0 #176

Commits

  • chore: fixed escheck script 4e93728
  • docs: added runkit comment f25bff6
  • docs: updated download urls b98f4b0
  • fix: fixed bug when a pending request had it cached empty (#165) 0a00778
  • style: formatted code b44c6b3

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.10.1...v0.10.2

axios-cache-interceptor - v0.10.1

Published by arthurfiorette over 2 years ago

Default options were updated

This isn't something that you should really care. All these options should have been enabled by default. (unless you are using a cache library and wants to avoid correct caching behaviors 😁)

As this package was evoluting, new cache options and behaviours were introduced. To avoid possible "breaking changes" on every release, they were shipped disabled by default. But, the majority of users won't enable them because they don't know their existence and/or what they do.

Important changes:

  • Enabled etag, staleIfError, and interpretHeader by default. (119fa32)
  • Fixed reference changes when using memory storage (#163 and #164)
  • Improved documentation in many areas. (Thanks @arnaud9145 and @himasimplisafe)
  • Restructured bundle options and folders (#167)
  • Fixed v0.10.0 build setup

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.9.3...v0.10.1

axios-cache-interceptor - v0.10.0

Published by arthurfiorette over 2 years ago

This version was shipped with a build bug. Please use 0.10.1.

axios-cache-interceptor - v0.9.3

Published by arthurfiorette over 2 years ago

Important Changes

  • FIxed url, baseURL and method being changed by buildKeyGenerator. Thanks @Chandu (#161).
  • defaultKeyGenerator now hashes every object returned by his generator, except for number and strings.

Merged

  • chore(deps-dev): bump webpack from 5.69.1 to 5.70.0 #162
  • chore(deps-dev): bump eslint-config-prettier from 8.4.0 to 8.5.0 #160
  • chore(deps): bump actions/checkout from 2 to 3 #158
  • chore(deps-dev): bump ts-loader from 9.2.6 to 9.2.7 #159
  • chore(deps-dev): bump typescript from 4.5.5 to 4.6.2 #157

Commits

  • chore: add funding.yml 2429ae2
  • chore: cache parser dependency range a71f9aa
  • docs: updated code comment 80850b9
  • docs: updated download urls 06091a2
  • fix: defaultKeyGenerator keeps response unchanged (#161) ab45164

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.9.2...v0.9.3

axios-cache-interceptor - v0.9.2

Published by arthurfiorette over 2 years ago

Important Changes

  • Updated all dependencies from tinylibs

Merged

  • chore(deps-dev): bump eslint from 8.9.0 to 8.10.0 #156
  • chore(deps): bump prismjs from 1.26.0 to 1.27.0 in /docs #155
  • chore(deps): bump actions/setup-node from 2 to 3 #154

Commits

  • deps: updated code dependencies 8d0dedb
  • docs: updated download urls 66fb00b

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.9.1...v0.9.2

axios-cache-interceptor - v0.9.1

Published by arthurfiorette over 2 years ago

Important Changes

  • React Native CLI Support (#153)

Merged

  • feat: support for react-native cli #153
  • chore(deps-dev): bump @types/jest from 27.4.0 to 27.4.1 #152
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #150
  • chore(deps-dev): bump @typescript-eslint/parser from 5.12.0 to 5.12.1 #151

Commits

  • docs: updated download urls 8b14a38

New Contributors

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.9.0...v0.9.1

axios-cache-interceptor - v0.9.0

Published by arthurfiorette over 2 years ago

Important Changes

  • Web storage handles Quota and DOMException errors (#148)

    If you were using buldWebStorage, when upgrading to v0.9.0, most likely all previous data saved will be lost.
    But this is not a problem, as in the next request it will be fetched again.
    (That's because the default prefix was changed from '' to '__ACI' to avoid conflicts by default)

Merged

  • feat: handle web storage DOMExceptions #148
  • chore(deps-dev): bump eslint-config-prettier from 8.3.0 to 8.4.0 #149
  • chore(deps-dev): bump webpack from 5.69.0 to 5.69.1 #147

Commits

  • deps: updated object-code 9f4b400
  • docs: updated docs and runkit playground 89066df
  • docs: updated download urls 683fdb2
  • style: formatted code 71fbfab

New Contributors

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.10...v0.9.0

axios-cache-interceptor - v0.8.10

Published by arthurfiorette over 2 years ago

Important Changes

  • Removed axios from peerDependencies. See #145

Merged

  • chore(deps-dev): bump webpack from 5.68.0 to 5.69.0 #146

Commits

  • docs: updated benchmark 97c38ba
  • docs: updated download urls 9d0d367
  • fix: peerDependencies warning (#145) 031934a

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.9...v0.8.10

axios-cache-interceptor - v0.8.9

Published by arthurfiorette over 2 years ago

Important Changes

  • Upgraded axios to v0.26 in peerDependencies

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.8...v0.8.9

axios-cache-interceptor - v0.8.8

Published by arthurfiorette over 2 years ago

Important changes

Extra information

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.5...v0.8.8

axios-cache-interceptor - v0.8.5

Published by arthurfiorette over 2 years ago

Important changes

New Contributors

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.4...v0.8.5

axios-cache-interceptor - v0.8.4

Published by arthurfiorette almost 3 years ago

Changes

  • Upgraded axios to 0.25.0.
  • Added Stale If Error options
  • Added sideEffects:false in the package.json
  • Documentation changes

Commits

  • chore: fix yarn.lock (yarnpkg/berry#3416) 9922650
  • chore: sideEffects: false and updated badges b555f95
  • deps: updated axios to v0.25 66f29c9
  • deps: updated eslint dependencies 2540c1e
  • docs: added staleIfError documentation 93dda05
  • docs: added table header 8273399
  • docs: updated documentation 668ce0c
  • docs: updated download urls c5629be
  • docs: updated rukit example 0aed72f
  • feat: add staleIfError support edb32bd
  • fix: removed breaking behaviour 7217eaf
  • refactor: use Object.freeze at Header enum 0e2508c
  • style: format code 1e8ca38

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.3...v0.8.4

axios-cache-interceptor - v0.8.3

Published by arthurfiorette almost 3 years ago

Commits

  • build: optimize umd builds with tslib 6d9683a
  • deps: updated cache-parser and jest 16184ac
  • docs: updated download urls d51c622
  • refactor: Header as const and renaming... e391f56

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.2...v0.8.3

axios-cache-interceptor - v0.8.2

Published by arthurfiorette almost 3 years ago

Commits

  • build: add umd/index.js for es2017+ 7f3a153
  • build: remove .min at umd bundles 5a7e015
  • chore: add source in the bundle 4c9c185
  • docs: updated docs a981cf2
  • docs: updated download urls 1ccfad3
  • docs: updated keyGenerator info 3c8b373
  • docs: updated umd filesizes ad51c23
  • feat: buildKeyGenerator and ids with req.data by default 9379fce
  • fix: include data at keyGenerator (#116) 6f9ef36
  • perf: only execute one generateKey per request fa2c6e3

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.1...v0.8.2

axios-cache-interceptor - v0.8.1

Published by arthurfiorette almost 3 years ago

Merged

  • build: Yarn v2 and ESM & CJS bundles #114
  • chore(deps): bump follow-redirects from 1.14.6 to 1.14.7 #113
  • chore(deps-dev): bump webpack from 5.65.0 to 5.66.0 #112

Commits

  • chore: eslint no-explicit-any 93df4fd
  • deps: fixed colors (marak/colors.js#285) 8243da5
  • deps: updated typescript-eslint monorepo 829b1a7
  • docs: fixed casing c76f2b7
  • docs: updated download urls ab53ac1
  • feat: cache predicate now supports async functions 88d45cc
  • fix: await unawaited promises and eslint more severe ff73ad5
  • fix: removed deprecated code e11e346
  • refactor: prefer unknown instead of any d0b0e2f
  • refactor: removed return await c3661a6
  • refactor: simplified cachePredicate 38a5ecd
  • refactor: used triple equal sign 1b93070
  • test: static roots to prevent other tests from running 57ee1e0

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.8.0...v0.8.1

axios-cache-interceptor - v0.8.0

Published by arthurfiorette almost 3 years ago

Commits

  • build: disabled downLevelIteration d30b862
  • deps: updated yarn.lock 2de68f3
  • docs: added SECURITY.md a6313ea
  • docs: fixed baseURL casing in examples & documentation 85336da
  • docs: updated download urls 75ec6fd
  • fix: code scanning alert 733a476
  • refactor: removed "abstract" buildInterceptor function f30e262
  • refactor: removed classes to decrease bundle size cd2f14c
  • refactor!: removed isAxiosCacheInterceptor function 37431a9
  • tests: fixed coverage by enabling sourceMaps again 17408aa
  • tests: splited header interpreter tests into multiple files 4f938a4

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.7.9...v0.8.0

axios-cache-interceptor - v0.8.0-beta1

Published by arthurfiorette almost 3 years ago

Merged

  • docs: documentation at axios-cache-interceptor.js.org #108
  • chore(deps-dev): bump jest from 27.4.6 to 27.4.7 #107
  • chore(deps-dev): bump jest from 27.4.5 to 27.4.6 #105
  • chore(deps-dev): bump @types/node from 17.0.7 to 17.0.8 #106
  • chore(deps-dev): bump @types/jest from 27.0.3 to 27.4.0 #98

Commits

  • chore: bundles exports everything and webpack bundles everything ed1e163
  • chore: fixed default tsconfig.json 96e2d80
  • chore: fixed runkit import 4c58316
  • docs: added blazing fast badge 225658f
  • docs: added bundlephobia link 7c19739
  • docs: added docs mention at runkit example bf486ac
  • docs: added info about global axios usage 53c4d41
  • docs: added interactive examples 7207542
  • docs: added og preview 636ebb3
  • docs: added url-imports example e34bfdd
  • docs: added usage and examples page 06d9979
  • docs: fixed cache.update example 766b016
  • docs: fixed development cdn link 3daf7be
  • docs: fixed examples and added cache: false example 16600b0
  • docs: fixed source links c5de326
  • docs: fixed sw.js location b11d51d
  • docs: fixed tsdocs and added storages section 4c1e0ec
  • docs: offline support for an axios library does not make sense 6353b48
  • docs: pwa config f810365
  • docs: trying to fix runkit cors bcc1f47
  • docs: updated readme 1f9ddb4
  • examples: updated runkit example 4cfa8d0
  • feat: added isAxiosCacheInterceptor function c32c452
  • feat: allow ttl to be defined based on the response 1e87549
  • feat: suupport for async CacheUpdater cfbd601
  • fix: include default storages in cjs bundle 8d5a90e
  • fix: proper generic usage to type deep properties ce2f597
  • merge: merge yarn.lock b66ee1e
  • merge: package.json and yarn.lock 9e3c0f0
  • refactor: added data property in memory storages 500ac71
  • refactor: allow storages not return promises 567c1b2
  • refactor: extracted static functions to a single file c57916f
  • refactor: modified and simplified storages bafe1de
  • refactor: prefer unknown over any and removed find method from storages 79ce192
  • refactor: simplified defaultKeyGenerator function c155982
  • refactor: simplified header interpreter e776f01
  • style: prettified code 3c38985
  • tests: 100% coverage again a7751fd

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.7.9...v0.8.0-beta1

axios-cache-interceptor - v0.7.9

Published by arthurfiorette almost 3 years ago

Merged

  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #97

Commits

  • deps: updated fast-defer c6bec60
  • docs: fixed badges links 37a37b7
  • docs: updated docs ec523e8
  • feat: added many build options 232e9c5
  • fix: verify built ecmascript versions with es-check 58b6b12
  • refactor: prevent confusion by renaming createCache to useCache 4a0a99f
  • test: added index.development tests 1e251dd

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.7.8...v0.7.9

axios-cache-interceptor - v0.7.8

Published by arthurfiorette almost 3 years ago

Commits

  • chore: fixed prettier config 144d3ae
  • deps: removed unused dependency 1b1b93b
  • docs: updated badges 5e04e5c
  • perf: minified code bundled as ES6 because axios itself needs ES6 8cad803

Full Changelog: https://github.com/arthurfiorette/axios-cache-interceptor/compare/v0.7.7...v0.7.8