http-slowfs-cache #
WARNING! There is no point in using this module when cache is placed on the same speed disk(s) as origin.
Source: upstream source
Directives
slowfs_big_file_size #
syntax: slowfs_big_file_size 1 arg (size (k/m/g)); · context: http, server, location
Size in bytes; accepts k / m / g suffixes.
slowfs_cache #
syntax: slowfs_cache on | off; · context: http, server, location
Selects the cache zone used to store responses for slow filesystem requests.
slowfs_cache_key #
syntax: slowfs_cache_key on | off; · context: http, server, location
Defines the key used to identify cached entries.
slowfs_cache_min_uses #
syntax: slowfs_cache_min_uses 1 arg (integer); · context: http, server, location
Integer value.
slowfs_cache_path #
syntax: slowfs_cache_path 2+ args; · context: http
Configuration notes =================== slowfs_cache_path and slowfs_temp_path values should point to the same filesystem, otherwise files will be copied twice.
slowfs_cache_purge #
syntax: slowfs_cache_purge 2 args; · context: location
Specifies the cache zone and key used to purge matching cached entries.
slowfs_cache_valid #
syntax: slowfs_cache_valid 1+ args; · context: http, server, location
Sets how long a response remains valid and servable from cache.
slowfs_temp_path #
syntax: slowfs_temp_path 1 arg (filesystem path); · context: http, server, location
Configuration notes =================== slowfs_cache_path and slowfs_temp_path values should point to the same filesystem, otherwise files will be copied twice.
Example
slowfs_cache_path /var/cache/slowfs levels=1:2 keys_zone=slowfs:10m
inactive=1h max_size=2g;
location /slow/ {
root /mnt/slow-disk;
slowfs_cache slowfs;
slowfs_cache_key $uri;
slowfs_cache_valid 200 1h;
slowfs_big_file_size 100m;
}