为什么Nginx从缓存中删除文件? [英] why does nginx delete files from cache?

查看:166
本文介绍了为什么Nginx从缓存中删除文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将max_size = 2000m设置为非活动状态= 1440h.

I have set max_size=2000m and inactive=1440h.

尽管此Nginx会从缓存中删除文件,尽管缓存只有120Mb.

In spite of this nginx keeps deleting files from cache although the cache is only 120Mb.

我的缓存文件夹下的文件都没有超过一个星期.

None of the files under my cache folder are over a week old.

知道为什么吗?

推荐答案

请阅读 http: //nginx.org/en/docs/http/ngx_http_proxy_module.html 有关缓存的文档.

Please read http://nginx.org/en/docs/http/ngx_http_proxy_module.html documentation about caching.

Cached data that are not accessed during the time specified by the
inactive parameter get removed from the cache regardless of their freshness.

所以,我想,您缓存的存在时间超过60天.那时的某些文件从未被访问过,并已被删除.

So, i suppose, you cache exists more than 60 days. Some files for that time never be accessed, and were removed.

这篇关于为什么Nginx从缓存中删除文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆