Closed otherguy closed 3 years ago
Hello, I have marked this as a feature request and will keep it in mind.
This is possible now in version 2.0:
const { fetchBuilder, FileSystemCache } = require('node-fetch-cache');
const fetch = fetchBuilder.withCache(new FileSystemCache({ ttl: 1000 }));
Please see the README for more info :)
Neat!
It would be even better if you could define a cache timeout :) I work around it now by adding a URL parameter, but having it in the module would be nicer.