nic-chen commented on a change in pull request #5183:
URL: https://github.com/apache/apisix/pull/5183#discussion_r730439594
##########
File path: apisix/plugins/ext-plugin/init.lua
##########
@@ -292,6 +293,31 @@ local function handle_extra_info(ctx, input)
end
+local function fetch_token(key)
+ return dict:get(key)
Review comment:
`dict` may be nil.
##########
File path: apisix/plugins/ext-plugin/init.lua
##########
@@ -292,6 +293,31 @@ 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 * 0.9
+ local success, err, forcible = dict:set(key, token, exp)
Review comment:
ditto
--
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]