cacheservice

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChacheExpired

func GetChacheExpired() time.Duration

GetChacheExpired get cache expired

Types

type CacheAssessor

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

CacheAssessor struct

func NewCacheAssessor

func NewCacheAssessor(ctx context.Context) *CacheAssessor

NewCacheAssessor creates a new CacheAssessor

func (*CacheAssessor) Delete

func (ca *CacheAssessor) Delete(index string) error

Delete remove cache contents

func (*CacheAssessor) Get

func (ca *CacheAssessor) Get(index string) (interface{}, bool)

Get returns cache contents

func (*CacheAssessor) Set

func (ca *CacheAssessor) Set(index string, value interface{}, expired time.Duration) error

Set puts cache contents

Jump to

Keyboard shortcuts

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