【发布时间】:2021-08-25 03:42:50
【问题描述】:
考虑我请求的网址是www.example.com/foo/emplooyee?names = test1;test2。 varnish 将整个 URL 与查询参数一起存储,以唯一标识缓存。
现在,在我的后端,我正在运行一项服务,我应该将其配置为每当 名称(即 test1 或 test2)发生更改时应该触发 HTTP 禁令一个较旧的名称(禁止表达式中一次一个名称)以使所有以相似名称输入的缓存 URL 无效。
问题: 我的客户请求网址可能是这样的,
- www.example.com/foo/emplooyee?names = test1;test2
- www.example.com/foo/emplooyee?names = test1;
- www.example.com/foo/emplooyee?names = test2;test1;test3;test4
- www.example.com/foo/emplooyee?names = test1;test4.
如何编写VCL代码并在Ban表达式中使所有查询参数为test1的对象无效?
【问题讨论】:
标签: regex varnish cache-control varnish-vcl