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


##########
apisix/consumer.lua:
##########
@@ -186,20 +215,34 @@ function _M.consumers()
 end
 
 
-local function create_consume_cache(consumers_conf, key_attr)
+local create_consume_cache
+do
+    local consumer_lrucache = core.lrucache.new({
+            count = consumers_count_for_lrucache
+        })
+
+local function fill_consumer_secret(consumer)
+    local new_consumer = core.table.clone(consumer)

Review Comment:
   I think deep-copy is not necessary. The consumer in the function 
`fill_consumer_secret(consumer)` is created in the `construct_consumer_data` 
function and is a copy of an element from the `consumers.values` list.



-- 
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]

Reply via email to