cache

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 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 Cache

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

Cache defines the structure required for a cache

func NewCache

func NewCache(interval time.Duration, ttl time.Duration) *Cache

NewCache creates a new cache

func (*Cache) DeleteAll

func (c *Cache) DeleteAll() error

func (*Cache) GetByID

func (c *Cache) GetByID(ID string) (*session.Session, error)

GetByID retrieves a session from the cache by ID

func (*Cache) Set

func (c *Cache) Set(s *session.Session) error

Set stores a session into the cache error could be returned when using redis

Jump to

Keyboard shortcuts

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