V
V
Vladimir2014-09-05 10:34:24
Nginx
Vladimir, 2014-09-05 10:34:24

How to configure nginx proxy_pass + caching ?

Tell me, is it possible to configure nginx as a caching front? If the file creation time has not changed, it should be given by nginx from the cache, if it has changed, it is given through the proxy_path

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HangGlider, 2014-09-05
@Casufi

If the files are static and lie locally, the meaning of the proxy is not clear. You can give files right away by writing the path in the appropriate location.
If the files are on a remote host, then you can configure their caching for a while. After the cache expires, a new file will be downloaded from the remote host and placed in the cache.
It is possible to force a request for a file bypassing the cache using request headers.
If you want to force the proxy server to contact the remote host every time to check the file time, then the very meaning of the proxy as a content delivery accelerator is lost.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question