aycache

package
v1.3.30 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QPS = promauto.NewGauge(
	prometheus.GaugeOpts{
		Name: "Cache_QPS",
		Help: "当前缓存QPS数量",
	},
)

QPS 是一个 Prometheus 指标,用于记录当前缓存的 QPS 数量

View Source
var QPSCount int

QPSCount 记录缓存的 QPS 计数

Functions

func New

func New(_name ...string) gcache.Adapter

New 根据传入的名称创建不同类型的缓存适配器 如果未传入名称,默认使用 "cache" 类型 支持的类型包括 "cache"(内存缓存)、"redis"(Redis 缓存)、"file"(文件缓存)和 "es"(Elasticsearch 缓存)

Types

type Mod

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

Mod 定义缓存模块结构体,包含一个 gcache.Cache 客户端实例

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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