Redis session store for Koyo
redis-session-store?
make-redis-session-store
8.12

Redis session store for Koyo🔗ℹ

Bogdan Popa <bogdan@defn.io>

This module provides an implementation of a Koyo session store that stores session data in a Redis database.

procedure

(redis-session-store? v)  boolean?

  v : any/c
Returns #t when v is a Redis session store.

procedure

(make-redis-session-store pool    
  [#:prefix prefix    
  #:ttl ttl])  session-store?
  pool : redis-pool?
  prefix : non-empty-string? = "sessions"
  ttl : exact-positive-integer? = (* 7 86400)
Returns a session store that stores session data in the Redis database that the clients provided by pool are connected to.

The #:prefix argument can be used to configure the prefix of session entry keys inside of the database. This can be useful when running multiple applications against the same Redis instance.

The #:ttl argument can be used to configure how long sessions are kept in the pool before they expire. Every interaction with a session resets its expiration time.