Skip to content

feat: session Redis store adapter #212

@FumingPower3925

Description

@FumingPower3925

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.

Metadata

Metadata

Labels

middlewareMiddleware implementation

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions