simplecache

package
v0.0.0-...-219e97f Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cache *cache.Cache

Functions

This section is empty.

Types

type ICache

type ICache interface {
	Open() *cache.Cache
	Set(key string, data interface{})
	Get(key string) *interface{}
	Delete(key string)
}

func NewSimpleCache

func NewSimpleCache(s SimpleCache) ICache

type SimpleCache

type SimpleCache struct {
	Cache     *cache.Cache
	ExpiredAt int
	PurgeTime int
}

func (*SimpleCache) Delete

func (s *SimpleCache) Delete(key string)

func (*SimpleCache) Get

func (s *SimpleCache) Get(key string) *interface{}

func (*SimpleCache) Open

func (s *SimpleCache) Open() *cache.Cache

func (*SimpleCache) Set

func (s *SimpleCache) Set(key string, data interface{})

Jump to

Keyboard shortcuts

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