Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
axios-cache-adapter-fs
Advanced tools
Use the local File System as a Store
for axios-cache-adapter.
This is built to enable easy caching on disk when building scripts that you intend to run in your local system only.
npm install --save axios-cache-adapter-fs
You can give a FileStore instance to axios-cache-adapter which will be used to store cache data instead of the default in-memory store.
import axios, { AxiosRequestConfig } from "axios"
import { setupCache } from "axios-cache-adapter"
import FileStore from "axios-cache-adapter-fs"
// `axios-cache-adapter` options
const instanceCache = setupCache({
store: new FileStore(),
})
// `axios` options
const config: AxiosRequestConfig = {
baseURL: "https://example.com",
adapter: instanceCache.adapter,
}
const httpClient = axios.create(config)
const response = await httpClient.get("/url")
Important note: Only GET
request results are cached by default. Executing a request using any method listed in exclude.methods
will invalidate the cache for the given URL.
Refer axios-cache-adapter's docs for further details.
FAQs
Use the local File System as a Store for axios-cache-adapter
The npm package axios-cache-adapter-fs receives a total of 1 weekly downloads. As such, axios-cache-adapter-fs popularity was classified as not popular.
We found that axios-cache-adapter-fs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.