Reputation: 864
nginx proxy has a directive proxy_cache_min_uses
but I can't find what's the time window used or how to set one. Because if it doesn't use any time window and just waits for the requests to reach some counter then eventually all requests will do, if you keep nginx running for long enough.
Or a relatively rare request would be quickly evicted from the cache because of least recently used policy and I shouldn't be too concerned about that?
Thanks
Upvotes: 9
Views: 2584
Reputation: 2596
proxy_cache_min_uses
just counts the number of requests after which the response from upstream will be cached.
Requests are evicted from cache when they are not accessed within an expiration time or when the size of the cache exceeds a max value (using LRU algorithm). You can tune the proxy cache via the proxy_cache_path directive (here a nice doc with examples).
Upvotes: 6