我正在使用本文https://www.nginx.com/blog/nginx-caching-guide/中的“填充缓存切片”
proxy_cache_path /tmp/mycache keys_zone=mycache:10m;
server {
listen 80;
proxy_cache mycache;
slice 1m;
proxy_cache_key $host$uri$is_args$args$slice_range;
proxy_set_header Range $slice_range;
proxy_http_version 1.1;
proxy_cache_valid 200 206 1h;
location / {
proxy_pass http://origin:80;
}
}
nginx正在缓存来自服务器的视频,但浏览器并未缓存视频。请帮帮我。
答案 0 :(得分:0)
我解决了问题。我在后端添加了ETag和Last-Modified。