Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README with new Cache Provider interface #608

Merged
merged 1 commit into from
Jun 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
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