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 RegisterResponseCacheGob()
- func SiteCache(store persistence.CacheStore, expire time.Duration) gin.HandlerFunc
- type ResponseCache
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
function to be used to cache pages in thread-safe manner
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 ¶
Click to show internal directories.
Click to hide internal directories.