Skip to content

Commit

Permalink
fix: config invalidation bug (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-manwani committed Jul 17, 2023
1 parent 621405d commit 4871563
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kong/plugins/config-by-env/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ function AppConfigHandler:access(conf)
end

function AppConfigHandler:init_worker()
-- listen to all CRUD operations made on Consumers
kong.worker_events.register(function(data)
if data["entity"]["name"] == "config-by-env" then
kong.log.notice("config-by-env: Invalidating Config")
kong.cache:invalidate_local("config-by-env-final")
kong.cache:invalidate("config-by-env-final")
end
end, "crud", "plugins:update")
end
Expand Down

0 comments on commit 4871563

Please sign in to comment.