You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/10/18 13:20:47 UTC

[GitHub] [apisix] kingluo commented on a diff in pull request #8113: fix(ai): add dynamic route cache key

kingluo commented on code in PR #8113:
URL: https://github.com/apache/apisix/pull/8113#discussion_r998211782


##########
apisix/core/ai.lua:
##########
@@ -71,6 +97,26 @@ function  _M.routes_analyze(routes)
     else
         core.log.info("use ai plane to match route")
         router.match = ai_match
+
+        if get_cache_key_func_def_render == nil then
+            local template = require("resty.template")

Review Comment:
   resty.template depends on `nginx.location`, but ai.lua would be called in `init_by_lua`, where no `ngx.location`, so the` require` would fail.



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