Welcome! Log In Create A New Profile

Advanced

How to clear the cache in a proper way - do I need to reload the server for this?

Posted by rokas 
How to clear the cache in a proper way - do I need to reload the server for this?
April 13, 2014 04:14PM
Hello,
I have scripts created that clear the cache by deleting all the cache folder or specific files from the cache according to keys. Do I need to reload the server with "killall -HUP nginx" after deleting files?
As I understand, If I just delete the file, the cached object key is still stored on memory. Is it cleared automatically? Does reloading help to clear it? I don't want server RAM to be wasted for storing non-existing objects.

I got concerned about this after I noticed the following records in error.log file:

2014/04/13 03:43:47 [crit] 23617#0: unlink() "/usr/local/nginx/cache/site1/2d/ca/ef5a2b4a35d954542d4c6eeb99dfca2d" failed (2: No such file or directory)

A lot of such errors were generated. I guess NGINX cannot find the deleted file? The generation of these messages ended after I run the "killall -HUP nginx" command on the server.
I have a server running multiple sites, but each site has its own cache folder and own cache key zone name.

Could you please answer my questions?

Thank you,

Rokas Zakarevicius, Ph.D.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 254
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready