On 2017-11-06 09:57:34 +0800, 永夜 wrote:
> lua-resty-http 也可以 +proxy_cache 不行吧, 没启用Proxy_pass 是没法启用proxy_cache的吧 ?
更 ngx.location.capture 类似, lua-restry-http 可以请求一个 openresty
内部的 server,再由这个 server proxy_pass 到 upstream 就能用 proxy_cache
了。不过 ngx.location.capture 是在程序内部处理的,只是不能用流处理;
lua-retry-http 则需要经过本地网卡,性能上会有所损失,但是可以用流处理。
如何取舍还是要看具体情况。