package
module
Version:
v0.0.0-...-23f57cc
Opens a new window with list of versions in this module.
Published: May 29, 2015
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
README
¶
nocache
No cache middleware for Negroni.
Usage
// main.go
package main
import (
"github.com/codegangsta/negroni"
"github.com/hexadecy/nocache"
"net/http"
)
func main() {
mux := http.NewServeMux()
recovery := negroni.NewRecovery()
logger := negroni.NewLogger()
static := nocache.NoCacheStatic(negroni.NewStatic(http.Dir("public")))
server := negroni.New(recovery, logger, static)
server.Use(nocache.NoCache())
server.UseHandler(mux)
}
Documentation
¶
NoCache set control-cache header to negroni server
NoCacheStatic set control-cache header to negroni static
Source Files
¶
Click to show internal directories.
Click to hide internal directories.