nocache

package module
v0.0.0-...-23f57cc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2015 License: MIT Imports: 2 Imported by: 1

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoCache

func NoCache() negroni.HandlerFunc

NoCache set control-cache header to negroni server

func NoCacheStatic

func NoCacheStatic(s *negroni.Static) negroni.HandlerFunc

NoCacheStatic set control-cache header to negroni static

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL