define

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheEvict

type CacheEvict GenKeyFunc

CacheEvict do Evict

type CacheHitHook

type CacheHitHook []func(c *gin.Context, cacheValue string)

CacheHitHook startup on hit hook

type Cacheable

type Cacheable struct {
	GenKey     GenKeyFunc
	CacheTime  time.Duration
	OnCacheHit CacheHitHook // 命中缓存钩子 优先级最高, 可覆盖Caching的OnCacheHitting
}

Cacheable do caching

type Caching

type Caching struct {
	Cacheable []Cacheable
	Evict     []CacheEvict
}

Caching mixins Cacheable and CacheEvict

type GenKeyFunc

type GenKeyFunc func(params map[string]interface{}) string

GenKeyFunc startup on hit hook

Jump to

Keyboard shortcuts

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