Manually flushing the Nginx cache causes errors in the log file

I am trying to clear the nginx cache when CMS (ExpressionEngine) publishes new content. I just cleared the entire folder and allowed to rebuild the cache. It seems to work fine, but fills the error logs with these entries:

2014/12/15 12:35:09 [crit] 21686#0: unlink() "/var/nginx/cache/default/6197dda0a6cadcec5563533cb6027580" failed (2: No such file or directory)
2014/12/15 12:35:10 [crit] 21686#0: unlink() "/var/nginx/cache/default/bb8eca6b51c655989bd717a9708b244e" failed (2: No such file or directory)
2014/12/15 12:35:10 [crit] 21686#0: unlink() "/var/nginx/cache/default/6f9b9aea38c5761a87cffd365e51e7a4" failed (2: No such file or directory)

It seems that nginx is tracking cache files and gets confused when it goes to clear them after I already done.

Is there a better way to clear a cache that does not cause these errors?

+4
source share
2 answers

At the top of my head, a way to do this is to specify secret headers in nginx that will bypass the cache, thereby theoretically clearing existing files.

. - , [crit], .:)

0
0

All Articles