spacewander commented on code in PR #8119:
URL: https://github.com/apache/apisix/pull/8119#discussion_r1002700387


##########
apisix/plugins/ai.lua:
##########
@@ -132,6 +132,12 @@ local function routes_analyze(routes)
         core.log.info("use ai plane to match route")
         router.router_http.match = ai_match
 
+        local count = #routes + 3000

Review Comment:
   > I don't think it's needed because 'cache' to 'no cache' means 
router.router_http.user_routes.conf_version has changed, refer to the 
explanation above.
   
   So it is acceptable to keep the unused cache when we move to 'no cache'?
   
   BTW, look like we can remove the init in 
https://github.com/apache/apisix/blob/3887162bc387b89c121f1ccbd823848a388cd6f5/apisix/plugins/ai.lua#L48
 as there will always create a router cache here? 



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