membphis commented on PR #11840:
URL: https://github.com/apache/apisix/pull/11840#issuecomment-2558769233

   this is the core reason whey the new way is better performance.
   
   use the cached data, reduce to recall `secret.fetch_secrets`
   
   <img width="829" alt="image" 
src="https://github.com/user-attachments/assets/e0b7b9ac-1751-4ef0-a029-fc8c0321c8ac";
 />
   
   I think we can use `lrucache`, which is easier way, here is the code 
example: 
   
   ```lua
   local lrucache = core.lrucache.new({
       ttl = 300, count = 5000  -- we can change the `count` as we need, in 
your case, we may change it to more than 17,000+
   })
   
   local new_consumer, err = lrucache(consumer, nil,
                       secret.fetch_secrets, consumer.auth_conf, false)
   ```
   
   I can not 100% confirm if it works, welcome to make a test in this way, many 
thx


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