mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
functions: performance improvements - LRU & singleflight DB calls (#322)
* functions: add cache and singleflight to ease database load * runner: upgrade * deps: upgrade glide files * license: add third party notifications * functions: fix handling of implicitly created apps * functions: code deduplication * functions: fix missing variable
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/iron-io/runner/common"
|
||||
)
|
||||
|
||||
func handleRouteCreate(c *gin.Context) {
|
||||
func (s *Server) handleRouteCreate(c *gin.Context) {
|
||||
ctx := c.MustGet("ctx").(context.Context)
|
||||
log := common.Logger(ctx)
|
||||
|
||||
@@ -80,5 +80,7 @@ func handleRouteCreate(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
s.resetcache(wroute.Route.AppName, 1)
|
||||
|
||||
c.JSON(http.StatusCreated, routeResponse{"Route successfully created", wroute.Route})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user