Skip to content

Commit 7fae114

Browse files
author
qihaiyan
committed
fix ut
1 parent d22b2fe commit 7fae114

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

apisix/cli/config.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ local _M = {
163163
["plugin-limit-req"] = "10m",
164164
["plugin-limit-count"] = "10m",
165165
["prometheus-metrics"] = "10m",
166-
["prometheus-cache"] = "10m",
167166
["plugin-limit-conn"] = "10m",
168167
["upstream-healthcheck"] = "10m",
169168
["worker-events"] = "10m",

apisix/cli/ngx_tpl.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ lua {
6767
{% if enabled_stream_plugins["prometheus"] then %}
6868
lua_shared_dict prometheus-metrics {* meta.lua_shared_dict["prometheus-metrics"] *};
6969
{% end %}
70-
{% if enabled_stream_plugins["prometheus"] and not enable_http then %}
70+
{% if enabled_plugins["prometheus"] or enabled_stream_plugins["prometheus"] then %}
7171
lua_shared_dict prometheus-cache {* meta.lua_shared_dict["prometheus-cache"] *};
7272
{% end %}
7373
{% if standalone_with_admin_api then %}
@@ -334,7 +334,9 @@ http {
334334
335335
{% if enabled_plugins["prometheus"] and not enabled_stream_plugins["prometheus"] then %}
336336
lua_shared_dict prometheus-metrics {* http.lua_shared_dict["prometheus-metrics"] *};
337-
lua_shared_dict prometheus-cache {* http.lua_shared_dict["prometheus-cache"] *};
337+
{% if not use_apisix_base then %}
338+
lua_shared_dict prometheus-cache {* meta.lua_shared_dict["prometheus-cache"] *};
339+
{% end %}
338340
{% end %}
339341
340342
{% if enabled_plugins["skywalking"] then %}

0 commit comments

Comments
 (0)