cache

package
v1.0.58 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

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

func Set

func Set(key string, value interface{}, duration time.Duration)

Types

type Cache

type Cache struct {
	sync.Map
}

func NewCache

func NewCache() *Cache

func (*Cache) Get

func (c *Cache) Get(key string) (interface{}, bool)

func (*Cache) Set

func (c *Cache) Set(key string, value interface{}, duration time.Duration)

type CacheItem

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

缓存结构体

Jump to

Keyboard shortcuts

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