cache

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheHelper

type CacheHelper struct {
	Provider ICacheProvider
}

func (*CacheHelper) Get

func (ch *CacheHelper) Get(context context.Context, key string, GetFunc func() interface{}, duration time.Duration) (interface{}, error)

type ICacheProvider

type ICacheProvider interface {
	Get(key string) (interface{}, bool)
	Set(key string, value interface{}, duration time.Duration)
}

Jump to

Keyboard shortcuts

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