Skip to content

Commit

Permalink
Update README with new Cache Provider interface (#608)
Browse files Browse the repository at this point in the history
Cache Provider interface has changed in #532 . This updates the readme for the new interface.
  • Loading branch information
cybercase committed Jun 15, 2021
1 parent bf41764 commit 8cc0d8e
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions README.md
Expand Up @@ -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)
Expand Down

0 comments on commit 8cc0d8e

Please sign in to comment.