AnoopAlias / AUTOM8N

AUTOM8N is a WHM/cPanel plugin providing a DNS load-balanced, high available, horizontally scaling webstack and offering active-active-redundancy-high-availability-and-native-nginx-on-cpanel
https://autom8n.com/
GNU General Public License v3.0
107 stars 53 forks source link

Feature Request - Purge Cache Option #616

Open brixly opened 4 years ago

brixly commented 4 years ago

Many clients have requested a 'purge cache' option, which would need to be applied to both nginx proxy caches and redis cache.

AnoopAlias commented 4 years ago

The big issue with Purging the proxy cache or fastcgi cache is that the caches are stored by the nginx worker process that run as nobody and all go in one place and the cPanel UI run as the user ..so the cPanel plugin wont be able to write to or delete the cache. even there is no separation between the files for each domain ..its all some a/b/xxxxxxx files owned by nobody etc. The only real solution is to use the PURGE method https://stackoverflow.com/questions/25857508/what-is-the-http-method-purge and this requires lot of support from application too . Even for the redis cache there is no purge per user unless the plugin nginx helper is used which selectively purge .

As root we can always rm -rf proxycache_dir/* and FLUSHALL/FLUSHDB in redis

Just need to think how to get this done right with such obstructions