ng-cache
TLDR
Delete the persistent disk cache
Disable the persistent disk cache for all projects in the workspace
Enable the persistent disk cache for all projects in the workspace
Print persistent disk cache configuration and statistics
SYNOPSIS
ng-cache <command> [options] [cache-path]
PARAMETERS
-p, --purge
Purge specified cache path or keys
-d, --dump
Dump cache contents for inspection
-c, --clear
Clear entire cache directory
--path PATH
Specify Nginx cache directory path
-k, --key KEY
Target specific cache key for action
-h, --help
Show usage information
DESCRIPTION
The ng-cache command appears to be a non-standard or third-party tool, likely related to managing caches in Nginx web servers. It is not part of core Linux distributions or standard man pages (man ng-cache yields no results). Such tools are often custom scripts or modules from Nginx extensions like nginx-cache-purge or lua-resty-cache for purging, dumping, or inspecting FastCGI, proxy, or static file caches.
Typically used in web server administration to optimize performance by clearing stale cache entries without restarting Nginx. If available, it might interface with Nginx's cache loader or cache manager processes. Installation usually requires compiling Nginx with specific modules (e.g., ngx_cache_purge) or using packages from repositories like EPEL/Remi for RHEL or PPAs for Ubuntu. Always verify source and permissions, as improper cache management can lead to data loss or service disruptions.
Without official documentation, usage relies on project-specific READMEs. Common workflows involve specifying cache paths defined in nginx.conf (proxy_cache_path or fastcgi_cache_path directives).
CAVEATS
Not standard Linux command. Requires Nginx with cache modules; check installation via package manager or source build. Risk of invalidating valid caches; test in staging. Root privileges often needed. Incompatible with some Nginx versions.
INSTALLATION NOTE
Often installed as nginx-helper plugin or via apt install lua-resty-cache-purge. Verify with which ng-cache.
NGINX CONFIG INTEGRATION
Enable in nginx.conf: load_module modules/ngx_http_cache_purge_module.so; then proxy_cache_purge /purge/zone/$scheme$request_uri;
HISTORY
Emerged in Nginx ecosystem around 2010s with cache purge modules (e.g., nginx-cache-purge by Leonardo Paedowitz). Evolved via community tools for dynamic cache invalidation, popularized by high-traffic sites needing granular control beyond basic proxy_cache_valid. No official Nginx core integration.
SEE ALSO
nginx(8), systemd-tmpfiles(8), sync(1), find(1)


