darkSheep404 commented on code in PR #11451: URL: https://github.com/apache/apisix/pull/11451#discussion_r1901567247
########## apisix/plugins/openid-connect.lua: ########## @@ -471,7 +472,8 @@ local function required_scopes_present(required_scopes, http_scopes) end function _M.rewrite(plugin_conf, ctx) - local conf = core.table.clone(plugin_conf) + local conf_clone = core.table.clone(plugin_conf) Review Comment: > performance tips: > > we can use a lrucache, avoid repeated rendering of plugin_conf configuration Thank you, but I don't fully understand your suggestion The original way, I just used `fetch_secret` without clone the config first , but with [this suggestion](https://github.com/apache/apisix/pull/11451#issuecomment-2561283094), I add `table.clone` before `fetch_secret` I think `fetch_secret` itself will return a clone of conf, and if you want to optimize it, maybe can just keep using fetch_secret directly, instead of add another extra lrucache -- 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]
