From da04cdc66c704b9b4f8fbf81ecf07c61fb285f8f Mon Sep 17 00:00:00 2001 From: Stefano Brilli Date: Tue, 8 Jun 2021 19:21:26 +0200 Subject: [PATCH] Update README with new Cache Provider interface Cache Provider interface has changed in #532 . This updates the readme for the new interface. --- README.md | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5c98100e..3ef6298f 100644 --- a/README.md +++ b/README.md @@ -359,28 +359,19 @@ To support this scenario you can provide an implementation for a cache provider ```javascript { - save: function(key, value, callback) { - // save the key with the optional value, invokes the callback with the value saves + saveAsync: async function(key, value) { + // saves the key with the optional value, returns the saved value }, - get: function(key, callback) { - // invokes 'callback' and passes the value if found, null otherwise + getAsync: async function(key) { + // returns the value if found, null otherwise }, - remove: function(key, callback) { - // removes the key from the cache, invokes `callback` with the + removeAsync: async function(key) { + // removes the key from the cache, returns the // key removed, null if no key is removed } } ``` -The `callback` argument is a function in the style of normal Node callbacks: - -``` -function callback(err, result) -{ - -} -``` - Provide an instance of an object which has these functions passed to the `cacheProvider` config option when using Passport-SAML. ## SLO (single logout)