cache

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheAdapter

type CacheAdapter interface {
	Get(key string) (interface{}, bool)
	Set(key string, value interface{}, expireSeconds string)
}

type LocalCacheAdapter

type LocalCacheAdapter struct {
	Client            *cache.Cache
	DefaultExpiration time.Duration
}

func NewLocalCacheAdapter

func NewLocalCacheAdapter(defaultExpirationSeconds int, cleanupIntervalSeconds int) *LocalCacheAdapter

func (LocalCacheAdapter) Get

func (c LocalCacheAdapter) Get(key string) (interface{}, bool)

func (LocalCacheAdapter) Set

func (c LocalCacheAdapter) Set(key string, value interface{}, expireSeconds string)

Jump to

Keyboard shortcuts

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