slowfs_cache_purge

This directive allows for purging specific cached files from the SlowFS cache using a designated cache zone and key.

Syntaxslowfs_cache_purge zone_name key;
Defaultnone
Contextlocation
Arguments2

Description

The slowfs_cache_purge directive is used in the NGINX SlowFS Cache Module to remove cached files based on a specified key within a defined cache zone. When a request matches this directive, it triggers the purge operation for the cache, effectively deleting the specified file from the cache. This is particularly useful for managing outdated or incorrect files that may need to be refreshed in the cache, ensuring users receive the most up-to-date content.

The directive takes two arguments: the name of the cache zone and the key representing the specific file that needs to be purged. The cache zone must be pre-defined with the slowfs_cache_path directive. This directive operates within the context of a location block, making it essential to define it correctly to ensure the NGINX server responds appropriately when a purge request is made.

Config Example

location /purge {
    slowfs_cache_purge my_cache my_key;
}

Ensure that the cache zone specified in the directive is properly defined with slowfs_cache_path and accessible from the location block.

Using the directive without the necessary permissions can lead to 403 Forbidden errors, as purging may be restricted by certain configurations or security settings.

← Back to all directives