file

package
v0.0.0-...-e1367df Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cacher

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

file缓存上下文

func NewCacher

func NewCacher(path string) *Cacher

创建file缓存上下文

func (*Cacher) Delete

func (c *Cacher) Delete(key string) error

删除缓存

func (*Cacher) Flush

func (c *Cacher) Flush() error

清除所有缓存

func (*Cacher) Get

func (c *Cacher) Get(key string) []byte

获取缓存

func (*Cacher) IsExist

func (c *Cacher) IsExist(key string) bool

判断缓存是否存在

func (*Cacher) Put

func (c *Cacher) Put(key string, val []byte) error

写入缓存

Jump to

Keyboard shortcuts

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