xuruidong commented on code in PR #11840:
URL: https://github.com/apache/apisix/pull/11840#discussion_r1898414968


##########
apisix/consumer.lua:
##########
@@ -101,10 +104,19 @@ local function plugin_consumer()
                 if not plugins[name] then
                     plugins[name] = {
                         nodes = {},
+                        len = 0,
                         conf_version = consumers.conf_version
                     }
                 end
 
+                local cached_consumer = consumers_id_cache[val.value.id]

Review Comment:
   The purpose of using consumer_id_cache is to avoid unnecessary table copies. 
I will refactor this part of the code to replace the table with an LRU cache.



-- 
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-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to