starcache

package
v0.0.0-...-aad8f25 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefCacheExp        time.Duration = 60 * time.Minute
	DefCleanupInterval time.Duration = 10 * time.Minute
)

Variables

This section is empty.

Functions

func Init

func Init(defaultExp, cleanupInt string)

Types

type ICache

type ICache interface {
	Set(key string, value interface{})
	SetWithExp(key string, value interface{}, exp time.Duration)
	SetWithoutExp(key string, value interface{})

	Get(key string) (interface{}, bool)
	GetString(key string) (string, bool)

	Delete(key string)

	Purge()
}

func GetCache

func GetCache() ICache

Jump to

Keyboard shortcuts

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