I am new to nginx caching but have worked with nginx a lot. I tried enabling
caching feature in our repository but it never worked so I thought I will
pull a fresh copy of nginx and turn it on. I ended with the same issue. For
some reason, nginx is not able to create the cache file in the cache dir. I
have already turned on proxy buffering and set full rw permission for all
users on the cache dir. I also gdb'ed the code and it seems like it gets
into ngx_open_and_stat_file from ngx_open_cached_file (
) and it tries to open an non existent file in RDONLY mode if the of->log is
not set (
Any help here would be awesome. I have also pasted my relevant config and
debug log below.
Here's my configuration.. (only the relevant part)
Ahhh interesting, that did the trick. Thank you so much.
I have been also trying to understand the internals of nginx caching and how
it works. I read the nginx blog about the overall architecture and the nginx
man page about proxy_cache_* directives. I am looking for the internal
architecture of the how the caching subsystem works. If you guys have any
documentation or article about it, that would be so useful.