cacheservice

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCachedDB

func GetCachedDB() int

GetCachedDB get cache db

func GetChacheExpired

func GetChacheExpired() time.Duration

GetChacheExpired get cache expired

func GetSessionDB

func GetSessionDB() int

GetSessionDB get session db

Types

type CacheAssessor

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

CacheAssessor struct

func NewCacheAssessor

func NewCacheAssessor(ctx context.Context, db int) *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