mirror of
https://github.com/kataras/iris.git
synced 2026-01-11 05:55:57 +00:00
Update to 7.2.0. Read https://github.com/kataras/iris/blob/master/HISTORY.md#th-15-june-2017--v720
Fix https://github.com/iris-contrib/community-board/issues/12 . Read more: https://github.com/kataras/iris/blob/master/HISTORY.md#th-15-june-2017--v720 Former-commit-id: 398cb69fdc7e5367b147693371287ffb7b912feb
This commit is contained in:
@@ -32,13 +32,12 @@ func ToHandler(handler interface{}) context.Handler {
|
||||
|
||||
// Cache provides cache capabilities to a route's handler.
|
||||
// Usage:
|
||||
// Get("/", Cache(func(ctx context.Context){
|
||||
// Get("/", iris.Cache(time.Duration(10*time.Second)), func(ctx context.Context){
|
||||
// ctx.Writef("Hello, world!") // or a template or anything else
|
||||
// }, time.Duration(10*time.Second))) // duration of expiration
|
||||
// if <=time.Second then it tries to find it though request header's "cache-control" maxage value.
|
||||
// })
|
||||
//
|
||||
// Deprecated. Use "github.com/kataras/iris/cache" sub-package instead.
|
||||
var Cache = cache.CacheHandler
|
||||
// Deprecated. Use "github.com/kataras/iris/cache" sub-package which contains the full features instead.
|
||||
var Cache = cache.Handler
|
||||
|
||||
// CheckErr is the old `Must`. It panics on errors as expected with
|
||||
// the old listen functions, change of this method will affect only ListenXXX functions.
|
||||
|
||||
Reference in New Issue
Block a user