Enable content caching
F5 NGINX as a Service for Azure (NGINXaaS) supports caching using the ngx_http_proxy_module module, improving performance by allowing content to be served from cache without having to contact upstream servers. For more information on caching with NGINX, see NGINX Content Caching.
http {
# ...
proxy_cache_path /var/cache/nginx keys_zone=mycache:10m;
}
NGINXaaS for Azure only supports caching to /var/cache/nginx
. This is because data at /var/cache/nginx
will be stored in a separate Temporary Disk. The size of the temporary disk is 4GB.
Currently, proxy_cache_purge
might not work as expected because NGINXaaS deploys multiple instances of NGINX Plus for high availability. The PURGE
request will be routed to a single instance, and only the matched values on that instance will be purged.