From a11a1352340a77769226b97917c8157290c1d95e Mon Sep 17 00:00:00 2001 From: Randall Schmidt Date: Sat, 3 Jul 2021 10:24:26 -0400 Subject: [PATCH] update readme --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a9d9108..f8047e0 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Load the module. ### await fetch(resource [, init]) -Same arguments as [node-fetch](https://www.npmjs.com/package/node-fetch). +Same arguments as [node-fetch](https://www.npmjs.com/package/node-fetch), except using the [Request class](https://www.npmjs.com/package/node-fetch#new-requestinput-options) is not supported. Returns a **CachedResponse**. @@ -139,6 +139,8 @@ const { fetchBuilder, FileSystemCache } = require('node-fetch-cache'); const fetch = fetchBuilder.withCache(new FileSystemCache(options)); ``` +Options: + ```js { cacheDirectory: '/my/cache/directory/path', // Specify where to keep the cache. If undefined, '.cache' is used by default. If this directory does not exist, it will be created. @@ -160,7 +162,7 @@ Both functions can be async. It is safe to remove values from the cache arbitrarily (for example if you implement a TTL in the caching delegate). -Example: you could make and use your own simple memory cache like this: +For example, you could make and use your own simple memory cache like this: ```js class MyMemoryCache {