spacewander commented on a change in pull request #2575:
URL: https://github.com/apache/apisix/pull/2575#discussion_r515773064
##########
File path: apisix/core/lrucache.lua
##########
@@ -125,42 +139,37 @@ end
global_lru_fun = new_lru_fun()
-local function _plugin(plugin_name, key, version, create_obj_fun, ...)
- local lru_global = global_lru_fun("/plugin/" .. plugin_name, nil,
- lru_new, PLUGIN_ITEMS_COUNT)
-
- local obj, stale_obj = lru_global:get(key)
- if obj and obj.ver == version then
- return obj.val
- end
-
- if stale_obj and stale_obj.ver == version then
- lru_global:set(key, stale_obj, PLUGIN_TTL)
- return stale_obj
- end
+local plugin_ctx
+do
+ local key_buf = {
+ nil,
+ nil,
+ nil,
+ }
+
+ function plugin_ctx(lrucache, api_ctx, extra_key, create_obj_fun, ...)
Review comment:
Updated.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]