memorysession

package
v0.0.0-...-8fa2440 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package memorysession provides an in-memory session store. Can optionally be used with a fallback backend, in which case it acts as a sort of cache.

Index

Constants

This section is empty.

Variables

View Source
var _, Log = xlog.New("web.session.memorysession")

Functions

func New

func New(cfg Config) (storage.Store, error)

Create a memory-based session store.

Types

type Config

type Config struct {
	// After what period of inactivity should sessions be removed from the store?
	// Sessions will still be left in any fallback store which is configured.
	//
	// Defaults to 4 hours.
	Expiry time.Duration

	// If set, acts as a writeback cache. If a session is not found in memory, it
	// is looked for in the fallback store. All session writes are persisted to
	// the fallback store.
	FallbackStore storage.Store
}

Memory-based session store configuration.

Jump to

Keyboard shortcuts

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