cache

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

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

Get get value of the key

func Set

func Set(k string, x interface{}, d time.Duration)

Set set the key-value with ttl

func SetCache

func SetCache(cache Cache)

SetCache set the cache instance for the sdk

Types

type Cache

type Cache interface {
	Get(k string) (interface{}, bool)
	Set(k string, x interface{}, d time.Duration)
}

Cache is the interface for common cache module

Jump to

Keyboard shortcuts

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