1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00

replace ioutil with io package and other minor improvements

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-06-17 22:03:18 +03:00
parent 20d2855a66
commit ef2643b046
108 changed files with 1069 additions and 1021 deletions

9
cache/browser.go vendored
View File

@@ -49,10 +49,11 @@ var NoCache = func(ctx *context.Context) {
// Usage: `app.Use(cache.StaticCache(24 * time.Hour))` or `app.Use(cache.Staticcache(-1))`.
// A middleware, which is a simple Handler can be called inside another handler as well, example:
// cacheMiddleware := cache.StaticCache(...)
// func(ctx iris.Context){
// cacheMiddleware(ctx)
// [...]
// }
//
// func(ctx iris.Context){
// cacheMiddleware(ctx)
// [...]
// }
var StaticCache = func(cacheDur time.Duration) context.Handler {
if int64(cacheDur) <= 0 {
return NoCache