Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何配置我的 VLC 以让 Varnish 尊重“Cache-Control max-age”请求标头?
我注意到,默认情况下,varnish 会提供缓存的内容,即使我在浏览器中按 F5(因此请求“新”副本)。
在vcl_hit您可以执行以下操作:
vcl_hit
if (req.http.Cache-Control ~ '\no-cache\b`) { purge; return (restart); }
确保您已导入 std vmod
import std;