Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean files that are not requested for x period of time. #78

Closed
igorescobar opened this issue May 20, 2020 · 1 comment
Closed

Clean files that are not requested for x period of time. #78

igorescobar opened this issue May 20, 2020 · 1 comment

Comments

@igorescobar
Copy link

Current Behavior

Nuster do not clean inactive files. It means that I might set a cache policy for that file that might make them being cached for months by default. For services that deal with millions of files this might mean a lot of money wasted on files that are not requested/needed anymore.

Expected Behavior

Nginx offers a parameter called inactive= on the proxy_cache_path directive:

proxy_cache_path /path/to/cache levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m use_temp_path=off;

What "inactive" does is:

Cached data that are not accessed during the time specified by the inactive parameter get removed from the cache regardless of their freshness. By default, inactive is set to 10 minutes.

So even though the file ttl is 6 months, it will still delete the file from the cache folder if they file isn't accessed for 60m in that case.

jiangwenyuan added a commit that referenced this issue Jun 8, 2020
@jiangwenyuan
Copy link
Owner

Added.

jiangwenyuan added a commit that referenced this issue Jun 9, 2020
(cherry picked from commit a2beaa4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants