cache

package
v0.4.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PageCachePrefix = "gincontrib.page.cache"
	ErrCacheMiss    = errors.New("cache: key not found.")
	ErrNotStored    = errors.New("cache: not stored.")
	ErrNotSupport   = errors.New("cache: not support.")
)

Functions

func CachePage

func CachePage(store cache.ICache, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc

func NewPageCache

func NewPageCache(store cache.ICache, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc

func SiteCache

func SiteCache(store cache.ICache, expire time.Duration) gin.HandlerFunc

Types

type Option

type Option func(*option)

func WithCache

func WithCache(cache cache.ICache) Option

WithCache cache

func WithLogger

func WithLogger(logger glog.ILogger) Option

Jump to

Keyboard shortcuts

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