[Nginx.Centos7]服务端定义缓存文件时长。 teddyou 2018-12-21 学习笔记 缓存一个文件的时长是由服务器定义的,客户端只能清除缓存,但不能定义缓存多长的时间。修改Nginx配置文件。vim /usr/local/nginx/conf/nginx.conf写在server{}里。location ~\.(jpg|png|gif) { //定义缓存文件类型“|”隔开 expires 1d; &nb 阅读全部