ttlstore

package module
v0.0.0-...-60f12cd Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TTLStore

type TTLStore struct {
	Codecs  []securecookie.Codec
	Options *sessions.Options
	// contains filtered or unexported fields
}

TTLStore stores gorilla sessions in TTL

func NewTTLStore

func NewTTLStore(keyPairs [][]byte, options ...ttlcache.Option[string, []byte]) *TTLStore

func (*TTLStore) Get

func (m *TTLStore) Get(r *http.Request, name string) (*sessions.Session, error)

func (*TTLStore) MaxAge

func (store *TTLStore) MaxAge(age int)

func (*TTLStore) New

func (store *TTLStore) New(r *http.Request, name string) (*sessions.Session, error)

func (*TTLStore) Save

func (store *TTLStore) Save(r *http.Request, w http.ResponseWriter, session *sessions.Session) error

func (*TTLStore) SetKeyPrefix

func (store *TTLStore) SetKeyPrefix(keyPrefix string)

Jump to

Keyboard shortcuts

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