tzssangglass commented on a change in pull request #5183:
URL: https://github.com/apache/apisix/pull/5183#discussion_r730434974
##########
File path: apisix/plugins/ext-plugin/init.lua
##########
@@ -292,6 +293,25 @@ local function handle_extra_info(ctx, input)
end
+local function fetch_token(key)
+ return dict:get(key)
+end
+
+
+local function store_token(key, token)
+ local exp = helper.get_conf_token_cache_time()
+ -- early expiry, lrucache in critical state sends prepare_conf_req as
original behaviour
+ exp = exp - 1
+ dict:set(key, token, exp)
Review comment:
update
##########
File path: apisix/plugins/ext-plugin/init.lua
##########
@@ -300,6 +320,12 @@ local rpc_handlers = {
local key = builder:CreateString(unique_key)
+ local token = fetch_token(key)
+ if token then
+ core.log.info("fetch token from shared dict")
Review comment:
update
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]