localcache

package
v0.0.0-...-0c66be6 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(defaultExp time.Duration, cleanupInterval time.Duration) func() (interfaces.CacheImpl, error)

Types

type Cache

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

func New

func New(defaultExp time.Duration, cleanupInterval time.Duration) (*Cache, error)

func (*Cache) Close

func (this *Cache) Close() (err error)

func (*Cache) Get

func (this *Cache) Get(key string) (value interface{}, resultType interfaces.ResultType, err error)

func (*Cache) GetWithExpiration

func (this *Cache) GetWithExpiration(key string) (value interface{}, resultType interfaces.ResultType, exp time.Duration, err error)

func (*Cache) Remove

func (this *Cache) Remove(key string) error

func (*Cache) Reset

func (this *Cache) Reset() error

func (*Cache) Set

func (this *Cache) Set(key string, value interface{}, exp time.Duration) (err error)

Jump to

Keyboard shortcuts

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