dao

package
v0.0.0-...-20fd351 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultClient = New(5*time.Minute, 10*time.Minute)
)

Functions

func Delete

func Delete(key string)

Delete delete

func Get

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

Get get

func Set

func Set(key string, val interface{}, d time.Duration)

Set set

Types

type Client

type Client interface {
	Get(key string) (interface{}, bool)
	Set(key string, val interface{}, d time.Duration)
	Delete(key string)
}

Client client interface

func New

func New(defaultExpiration, cleanupInterval time.Duration) Client

New new client

Jump to

Keyboard shortcuts

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