Add files to cache manually
nginx-forum at forum.nginx.org
Fri May 21 16:18:51 UTC 2021
> Is there a reason why you need nginx "cache" instead of just storing the
I don't have a big enough disk to store *all* user uploaded files
accumulated over the years. So I need some way to manage a pool of space to
store hot uploads.
> One way would be instead of using the cache just store the files as is (in
the same structure) with proxy_store
I did not know about proxy_store. But that may come in handy if I have to
implement everything myself. Thank you.
> The only drawback in this is that you have to manage the cache directory
yourself (delete old files / implement LRU if needed etc), but that's
usually not too hard with `find` and works just fine.
Right. The devil is in the detail, which is why I'd prefer to lean on the
robustness of nginx. It seems like nginx is 99% there. It is "just" lacking
a way to inject an HTTP response into the cache (i.e. a way to warm up the
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,291581,291592#msg-291592
More information about the nginx