Documentation ¶
Index ¶
- type Cache
- type CacheHandler
- func (cache *CacheHandler) DoEvict(ctx context.Context, keys []string)
- func (cache *CacheHandler) Handler(caching Caching, next gin.HandlerFunc) gin.HandlerFunc
- func (cache *CacheHandler) Load(ctx context.Context, key string) string
- func (cache *CacheHandler) Set(ctx context.Context, key string, data string, timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheHandler ¶
type CacheHandler struct { Cache Cache OnCacheHit CacheHitHook // 命中缓存钩子 优先级低 }
func (*CacheHandler) DoEvict ¶
func (cache *CacheHandler) DoEvict(ctx context.Context, keys []string)
func (*CacheHandler) Handler ¶
func (cache *CacheHandler) Handler(caching Caching, next gin.HandlerFunc) gin.HandlerFunc
Handler for startup
Click to show internal directories.
Click to hide internal directories.