MCPcopy
hub / github.com/QuantumNous/new-api / DisableCache

Function DisableCache

middleware/disable-cache.go:5–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import "github.com/gin-gonic/gin"
4
5func DisableCache() gin.HandlerFunc {
6 return func(c *gin.Context) {
7 c.Header("Cache-Control", "no-store, no-cache, must-revalidate, private, max-age=0")
8 c.Header("Pragma", "no-cache")
9 c.Header("Expires", "0")
10 c.Next()
11 }
12}

Callers 1

SetApiRouterFunction · 0.92

Calls 1

NextMethod · 0.45

Tested by

no test coverage detected