Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HeaderHitCache = "Hit-Cache"
HeaderHitCache the header key
Functions ¶
func Gzip ¶
func Gzip(req *http.Request, res http.ResponseWriter, chain *utils.FilterChain)
Gzip static file compression
func JSCache ¶
func JSCache(req *http.Request, res http.ResponseWriter, chain *utils.FilterChain)
JSCache cache the JS static file.
Types ¶
type CacheWriter ¶
type CacheWriter struct {
// contains filtered or unexported fields
}
CacheWriter generate the cache item the response body and status
func (*CacheWriter) WriteHeader ¶
func (c *CacheWriter) WriteHeader(statusCode int)
WriteHeader cache the status code
Click to show internal directories.
Click to hide internal directories.