httpcache.go
func Cache(bodyHandler http.Handler, expiration time.Duration) *nethttp.Handler {
	return nethttp.NewHandler(bodyHandler, expiration)
}
func Cache(bodyHandler http.Handler, expiration time.Duration) *nethttp.Handler {
	return nethttp.NewHandler(bodyHandler, expiration)
}
func Cache ( bodyHandler http . Handler , expiration time . Duration ) * nethttp . Handler { return nethttp . NewHandler ( bodyHandler , expiration ) }
// func When(cachedHandler *nethttp.Handler, claimFuncs, validFuncs)
// | We could have something like this
//  but this wouldn't work for 'XXXFunc' & fasthttp because they just returns a function |
// Cache accepts two parameters
// first is the http.Handler which you want to cache its result
// the second is, optional, the cache Entry's expiration duration
// if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header
// returns an http.Handler, which you can use as your default router or per-route handler
//
// All type of responses are cached, templates, json, text, anything.
//
// You can add validators with this function
func When ( cachedHandler * nethttp . Handler claimFuncs validFuncs ) | We could have something like this but this wouldn t work for XXXFunc & fasthttp because they just returns a function | Cache accepts two parameters first is the http . Handler which you want to cache its result the second is optional the cache Entry s expiration duration if the expiration < = 2 seconds then expiration is taken by the cache - control s maxage header returns an http . Handler which you can use as your default router or per - route handler All type of responses are cached templates json text anything . You can add validators with this function