Skip to content

Commit

Permalink
perf(acl) properly cache intermediary config
Browse files Browse the repository at this point in the history
Prior to this patch, the `if not config` branch was hit during every
request, effectively nullifying the plugin's config cache optimization.

From #4040
  • Loading branch information
thibaultcha authored Dec 3, 2018
1 parent 043e5f8 commit 408ce27
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kong/plugins/acl/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function ACLHandler:access(conf)
config.type = (conf.blacklist or EMPTY)[1] and BLACK or WHITE
config.groups = config.type == BLACK and conf.blacklist or conf.whitelist
config.cache = setmetatable({}, mt_cache)
config_cache[conf] = config
end

-- get the consumer/credentials
Expand Down

0 comments on commit 408ce27

Please sign in to comment.