interfaces

package
v1.0.1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// 判断是否存在
	Exists(string) bool

	// 获取
	Get(string) (any, error)

	// 存储
	Put(string, any, time.Duration) error

	// 存储一个不过期的数据
	Forever(string, any) error

	// 自增
	Increment(string, ...int64) error

	// 自减
	Decrement(string, ...int64) error

	// 删除
	Forget(string) (bool, error)

	// 清空所有缓存
	Flush() (bool, error)
}

*

  • 驱动接口 *
  • @create 2021-7-15
  • @author deatil

Jump to

Keyboard shortcuts

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