caches

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager interface {

	// 清空缓存
	Clean()

	// 取缓存对象
	Get(p Provider) (any, error)
}

Manager 用来管理缓存

type Provider

type Provider interface {

	// 新建缓存对象
	New() (any, error)

	// 缓存类型名称
	ClassName() string
}

Provider 提供某个类的缓存

type ProviderRegistration

type ProviderRegistration struct {
	ClassName string
	Enabled   bool
	Provider  Provider
}

ProviderRegistration 表示缓存类的注册信息

type ProviderRegistry

type ProviderRegistry interface {
	ListProviderRegistrations() []*ProviderRegistration
}

ProviderRegistry 缓存类的注册器 [inject:".wpm-cache-provider"]

Jump to

Keyboard shortcuts

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