Can NGINX cache metadata get updated automatically, if file is added through backdoor by another NGINX proxy-cache?

rnmx18 nginx-forum at
Fri Sep 29 09:00:22 UTC 2017


I have a use-case, where NGINX (say NGINX-process-1) is set up as a reverse
proxy, with caching enabled (say in /mnt/disk2/pubRoot, with zone name
"cacheA"). However, I have another NGINX (say NGINX-Process-B) which also
runs in parallel, and caches its content in (/mnt/disk2/frontstore, with
zone name "cacheB"). Additionally, there is another application which
monitors this "frontstore", and copies its content to "pubRoot".

So, effectively, any content that NGINX-B caches in frontstore gets
available in the cache-path which is configured for NGINX-A. However,
NGINX-A cannot get it as HIT when it receives a request, as its metadata
(zoneA) does not have the information, as it didn't cache it there in the
first place.

Is there a mechanism by which NGINX-A cache lookup can get a HIT in such a

A work-around which I can think is, if NGINX-A is restarted, it will build
its cache based on available files in its cache-path. This way, it will get
its metadata populated with the file in pubRoot. Then on, a new request may
result in a cache-HIT.


Posted at Nginx Forum:,276611,276611#msg-276611

More information about the nginx mailing list