You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "darkSheep404 (via GitHub)" <gi...@apache.org> on 2025/01/03 08:35:23 UTC
Re: [PR] feat: allow to use environment variables for openid-connect plugin [apisix]
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org