Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // NoCache disables the cache for a particular request, // can be used as a middleware or called manually from the handler. NoCache = client.NoCache )
Functions ¶
func Cache ¶
Cache accepts the cache expiration duration if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header returns context.Handler, which you can use as your default router or per-route handler
All types of response can be cached, templates, json, text, anything.
Use it for server-side caching, see the `iris#Cache304` for an alternative approach that may fit your needs most.
You can add validators with this function.
func Handler ¶
Handler accepts one single parameter: the cache expiration duration if the expiration <=2 seconds then expiration is taken by the "cache-control's maxage" header returns context.Handler.
All types of response can be cached, templates, json, text, anything.
Use it for server-side caching, see the `iris#Cache304` for an alternative approach that may fit your needs most.
it returns a context.Handler which can be used as a middleware, for more options use the `Cache`.
Examples can be found at: https://github.com/kataras/iris/tree/master/_examples/#caching
Types ¶
This section is empty.