使用Nginx作缓存服务器以及删除其缓存文件的方法

2019-10-17 19:57:31于海丽

c ngx_cache_purge不做考虑,据说已经停止开发了

说明:

1 我的 /root/sbin/rm_apk_list.txt 文件

[root@budong ~]# cat /root/sbin/rm_apk_list.txt 
/2013/08/15/38/382272/shuazanzhushou_V1.8.16_mumayi_95a91.apk

2 查看一个缓存对象,应该有些明白了吧

[root@budong ~]# more /data/mumayi/cache/0/00/db9327b60a6b3c164516117f90d9d000 

KEY: /2013/10/23/43/432816/dinuochongwuDinoPets_V1.1.1_mumayi_0b399.apk
HTTP/1.1 200 OK
Server: nginx/1.2.6
Date: Sun, 15 Dec 2013 19:51:22 GMT
Content-Type: application/vnd.android.package-archive
Content-Length: 37466293
Connection: close
Last-Modified: Wed, 23 Oct 2013 06:15:06 GMT
Expires: Wed, 18 Dec 2013 17:35:07 GMT
Cache-Control: max-age=604800
Accept-Ranges: bytes