Summary
Add a Redis-backed session.Store implementation that uses celeris's native Redis driver.
Context
The session middleware already defines a Store interface:
type Store interface {
Get(ctx context.Context, id string) (map[string]any, error)
Save(ctx context.Context, id string, data map[string]any, expiry time.Duration) error
Delete(ctx context.Context, id string) error
Reset(ctx context.Context) error
}
Currently only MemoryStore is provided. For multi-instance deployments, sessions must be shared via an external store.
Scope
Design Principle
The store adapter should depend on a driver-agnostic Store interface so that future drivers (Memcached, DynamoDB, etc.) can implement the same interface without changing the session middleware.
Summary
Add a Redis-backed
session.Storeimplementation that uses celeris's native Redis driver.Context
The session middleware already defines a
Storeinterface:Currently only
MemoryStoreis provided. For multi-instance deployments, sessions must be shared via an external store.Scope
RedisStoresatisfyingsession.StoreReset()uses SCAN+DEL with key prefix (not FLUSHDB)sess:)Design Principle
The store adapter should depend on a driver-agnostic
Storeinterface so that future drivers (Memcached, DynamoDB, etc.) can implement the same interface without changing the session middleware.