axios-cache-interceptor/docs/pages/_comparison-table.md
2022-02-17 19:46:52 -03:00

24 lines
4.6 KiB
Markdown

| | Axios Cache Interceptor | Axios Cache Adapter | Cachios |
| :--------------------------------------------------------------------------: | :---------------------: | :--------------------------------------------------------------------: | :------------------: |
| Compared version | Latest | 2.7.3 | 3.1.1 |
| Expiration with [TTL](https://developer.mozilla.org/en-US/docs/Glossary/TTL) | ✅ | ✅ | ✅ |
| Per-request configuration | ✅ | ✅ | ✅ |
| Global and custom instance | ✅ | ✅ | ✅ |
| Cache-Control header | ✅ | ✅ | 🛑 |
| Expires & Age header | ✅ | 🟡 | 🛑 |
| ETag and If-None-Match header | ✅ | 🛑 | 🛑 |
| If-Modified-Size header | ✅ | 🛑 | 🛑 |
| Bundle size | **3.7Kb** (gzip) | 18.9Kb (gzip) | 19.5Kb (gzip) |
| Typescript declaration | ✅ (Custom interface) | ✅ (Applied globally) | ✅(Applied globally) |
| Custom cache keys | ✅ | ✅ | ✅ |
| Multiple storages | ✅ | 🔶 (Only localForage) | ✅ |
| Built-in redis storage | 🔶 | ✅ | 🟡 |
| Storage size limit | 🔶 | ✅ | ✅ |
| Node & Web compatible | ✅ | ✅ | 🛑 |
| Invalidade cache based on response | ✅ | ✅ | 🛑 |
| Update cache based on response | ✅ | 🟡 | 🟡 |
| Predicate to test if request should be cached | ✅ | ✅ | 🛑 |
| Concurrent requests | ✅ | 🔶[#231](https://github.com/RasCarlito/axios-cache-adapter/issues/231) | 🛑 |
| Cache fallback on network errors | ✅ | ✅ | ✅ |
| Debug / Development mode | ✅ | ✅ | 🛑 |