apisix icon indicating copy to clipboard operation
apisix copied to clipboard

request help: How to explain the key of ‘no_cache’ in 'proxy-cache' of plugin

Open StretchV opened this issue 5 years ago • 4 comments

Issue description

proxy-cache 插件中的no_cache项如何配置呢,这个值为什么是一个数组呢,数组中的值代表什么呢?数组中的值是被缓存的还是不被缓存的呢?说明文档如下: 12312121212121

这句话的意思是只要数组是除了‘0’以外的值或空数组,这个插件就不启用缓存功能了是吗?

Environment

  • apisix version (cmd: apisix version): 2.3

StretchV avatar May 13 '21 08:05 StretchV

根据说明描述,我感觉这个‘no_cache’应该是bool值才对呀,为什么是个数组呢

StretchV avatar May 13 '21 08:05 StretchV

关于文档中的这个例子 22222222222222 我想尝试理解一下,不知道是不是正确的 当请求 http://XXXX/hello?test=XXXX 时,插件是不对这个请求做缓存的 当请求 http://XXXX/hello时,由于参数test的值是‘’,所以对这个请求的值做缓存 这个理解正确吗

StretchV avatar May 13 '21 08:05 StretchV

如果我配置成 { "disable": false, "hide_cache_headers": false, "no_cache": [ "XXXXX" ] } 是不是这个插件就永远不会起到缓存的目的呢

StretchV avatar May 13 '21 08:05 StretchV

@StretchV This list allows you to configure some conditions so that APISIX won't cache some requests if the evolution of the condition is true.

tokers avatar May 13 '21 10:05 tokers