This commit is contained in:
ryan
2026-03-09 22:43:14 +08:00
commit 34f317fe6f
98 changed files with 20718 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
package middleware
import (
"github.com/gin-gonic/gin"
)
func Cache() func(c *gin.Context) {
return func(c *gin.Context) {
c.Header("Cache-Control", "max-age=604800") // one week
c.Next()
}
}