2015-10-13 09:08:08 +00:00
|
|
|
package cache
|
|
|
|
|
|
|
|
import (
|
2015-10-20 23:45:24 +00:00
|
|
|
"github.com/drone/drone/cache"
|
|
|
|
"github.com/gin-gonic/gin"
|
2015-10-13 09:08:08 +00:00
|
|
|
)
|
|
|
|
|
2015-10-20 23:45:24 +00:00
|
|
|
func Default() gin.HandlerFunc {
|
|
|
|
cc := cache.Default()
|
|
|
|
return func(c *gin.Context) {
|
|
|
|
cache.ToContext(c, cc)
|
|
|
|
c.Next()
|
2015-10-13 09:08:08 +00:00
|
|
|
}
|
|
|
|
}
|