cache

package
v0.0.0-...-9b5a78d Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(name string) interface{}

func GetString

func GetString(name string) string

func KeyExists

func KeyExists(name string) bool

func Set

func Set(name string, object interface{}, ttl *time.Duration)

func SetString

func SetString(name string, object string, ttl *time.Duration)

func Unset

func Unset(name string)

Types

type Cache

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

func NewCache

func NewCache() *Cache

func (*Cache) Get

func (self *Cache) Get(name string) interface{}

func (*Cache) GetString

func (self *Cache) GetString(name string) string

func (*Cache) KeyExists

func (self *Cache) KeyExists(name string) bool

func (*Cache) Set

func (self *Cache) Set(name string, object interface{}, ttl *time.Duration)

func (*Cache) Unset

func (self *Cache) Unset(name string)

type CachedObject

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

func NewCachedObject

func NewCachedObject(object interface{}, now time.Time, ttl *time.Duration) *CachedObject

func (*CachedObject) IsExpired

func (self *CachedObject) IsExpired() bool

Jump to

Keyboard shortcuts

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