Archived
Template
1
0
This repository has been archived on 2023-12-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
golang-base-project/middleware/cache.go

11 lines
183 B
Go
Raw Normal View History

package middleware
import "github.com/gin-gonic/gin"
func Cache() gin.HandlerFunc {
return func(c *gin.Context) {
c.Header("Cache-Control", "public, max-age=60")
c.Next()
}
}