cache

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryCache

type InMemoryCache struct {
	// contains filtered or unexported fields
}

InMemoryCache implements an in-memory session cache

func NewInMemoryCache

func NewInMemoryCache(c core.CacheConfig) *InMemoryCache

NewInMemoryCache creates a new in-memory cache

func (*InMemoryCache) Clear

func (c *InMemoryCache) Clear() error

Clear removes all sessions from cache

func (*InMemoryCache) Delete

func (c *InMemoryCache) Delete(tokenHash string) error

Delete removes a session from cache

func (*InMemoryCache) Get

func (c *InMemoryCache) Get(tokenHash string) (*core.Session, error)

Get retrieves a session from cache

func (*InMemoryCache) Len

func (c *InMemoryCache) Len() int

Len returns the number of cached sessions

func (*InMemoryCache) Set

func (c *InMemoryCache) Set(tokenHash string, session *core.Session) error

Set stores a session in cache

func (*InMemoryCache) Stats

func (c *InMemoryCache) Stats() core.CacheStats

Stats returns cache statistics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL