cache

package
v0.0.0-...-e4f806a Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidIDPart = errors.New("invalid cache key ID part, must be string, []byte or rune")

Functions

func SetupViper

func SetupViper()

func StartCacheClient

func StartCacheClient(cache *Cache)

func StopCacheClient

func StopCacheClient(cache *Cache)

Types

type Cache

type Cache struct {
	Options *Options
	Client  *redis.Client
	Logger  *logrus.Logger
}

func (*Cache) CreateID

func (c *Cache) CreateID(parts ...interface{}) (*strings.Builder, error)

func (*Cache) PurgeClientCache

func (c *Cache) PurgeClientCache(clientID string) (int32, error)

func (*Cache) PurgeSubjectCache

func (c *Cache) PurgeSubjectCache(subject string, sessionID string) (int32, error)

type Options

type Options struct {
	Prefix      string
	Password    string
	DB          int
	MasterName  string
	MaxPoolSize int
	MinPoolSize int
	Nodes       []string
	Node        string
	Sentinel    bool
}

Jump to

Keyboard shortcuts

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