Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
johzchen authored and membphis committed Aug 19, 2019
1 parent 5c9d71b commit 3fd23fe
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lua/apisix/plugins/grpc-proxy/proto.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
local core = require("apisix.core")
local protoc = require("protoc")
local lrucache = require("apisix.core.lrucache")
local config = require("apisix.core.config_etcd")
local schema = require("apisix.core.schema")
local protos


local lrucache_proto = core.lrucache.new({
ttl = 300, count = 256
})

local function protos_arrange(proto_id)
if protos.values == nil then
return nil
Expand Down Expand Up @@ -39,9 +36,8 @@ end
local _M = {version = 0.1}


_M.new = function(proto_id)
local key = "/proto" .. proto_id
return lrucache_proto(key, protos.conf_version, protos_arrange, proto_id)
function _M.new(proto_id)
return lrucache.global("/protoc", protos.conf_version, protos_arrange, proto_id)
end


Expand Down

0 comments on commit 3fd23fe

Please sign in to comment.