mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
server: Add global LRU for routes with keys being the appname + path (#472)
* Add global lru for routes with keys being the appname + path * minor comment fixes * remove duplicate entires from THIRD_PARTY * Make sure that we lock and unlock on get, refresh and delete on the cache
This commit is contained in:
committed by
C Cirello
parent
b8d01817b8
commit
6f8e94629f
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/iron-io/functions/api/mqs"
|
||||
"github.com/iron-io/functions/api/runner"
|
||||
"github.com/iron-io/functions/api/runner/task"
|
||||
"github.com/iron-io/functions/api/server/internal/routecache"
|
||||
)
|
||||
|
||||
type testSpecialHandler struct{}
|
||||
@@ -44,9 +45,10 @@ func TestSpecialHandlerSet(t *testing.T) {
|
||||
{Path: "/test", Image: "iron/hello", AppName: "test"},
|
||||
},
|
||||
},
|
||||
MQ: &mqs.Mock{},
|
||||
tasks: tasks,
|
||||
Enqueue: DefaultEnqueue,
|
||||
MQ: &mqs.Mock{},
|
||||
tasks: tasks,
|
||||
Enqueue: DefaultEnqueue,
|
||||
hotroutes: routecache.New(2),
|
||||
}
|
||||
|
||||
router := s.Router
|
||||
|
||||
Reference in New Issue
Block a user