Documentation ¶
Index ¶
- Constants
- Variables
- func Cache(store *persistence.CacheStore) gin.HandlerFunc
- func CachePage(store persistence.CacheStore, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc
- func CachePageAtomic(store persistence.CacheStore, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc
- func CachePageWithoutHeader(store persistence.CacheStore, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc
- func CachePageWithoutQuery(store persistence.CacheStore, expire time.Duration, handle gin.HandlerFunc) gin.HandlerFunc
- func CreateKey(u string) string
- func RegisterResponseCacheGob()
- func SiteCache(store persistence.CacheStore, expire time.Duration) gin.HandlerFunc
Constants ¶
View Source
const (
CACHE_MIDDLEWARE_KEY = "gincontrib.cache"
)
Variables ¶
View Source
var (
PageCachePrefix = "gincontrib.page.cache"
)
Functions ¶
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 ¶
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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.