Back to godoc.org
github.com/gin-contrib/cache

Package cache

v1.1.0
Latest Go to latest
Published: Nov 5, 2018 | License: MIT | Module: github.com/gin-contrib/cache

Index

Package Files

Constants

const (
	CACHE_MIDDLEWARE_KEY = "gincontrib.cache"
)

Variables

var (
	PageCachePrefix = "gincontrib.page.cache"
)

func Cache

func Cache(store *persistence.CacheStore) gin.HandlerFunc

Cache Middleware

func CachePage

func CachePage(store persistence.CacheStore, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc

CachePage Decorator

func CachePageAtomic

func CachePageAtomic(store persistence.CacheStore, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc

CachePageAtomic Decorator

func CachePageWithoutHeader

func CachePageWithoutHeader(store persistence.CacheStore, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc

func CachePageWithoutQuery

func CachePageWithoutQuery(store persistence.CacheStore, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc

CachePageWithoutQuery add ability to ignore GET query parameters.

func CreateKey

func CreateKey(u string) string

CreateKey creates a package specific key for a given string

func RegisterResponseCacheGob

func RegisterResponseCacheGob()

RegisterResponseCacheGob registers the responseCache type with the encoding/gob package

func SiteCache

func SiteCache(store persistence.CacheStore, expire time.Duration) gin.HandlerFunc
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier