Complete the code to bypass cache when the request method is POST.
if ($request_method = [1]) { set $bypass_cache 1; }
POST requests usually change data, so we bypass cache for them.
Complete the code to bypass cache when the request has a cookie named 'session'.
if ($http_cookie ~* [1]) { set $bypass_cache 1; }
The 'session' cookie usually means the user is logged in, so cache should be bypassed.
Fix the error in the code to bypass cache when the query string contains 'nocache=1'.
if ($arg_nocache [1] 1) { set $bypass_cache 1; }
Use '==' to compare variables in nginx if statements.
Fill both blanks to bypass cache when the request method is POST or the cookie 'session' exists.
if ($request_method = [1] || $http_cookie ~* [2]) { set $bypass_cache 1; }
POST requests and presence of 'session' cookie both require cache bypass.
Fill all three blanks to bypass cache when the request method is POST, or the cookie 'session' exists, or the query string 'nocache=1' is present.
if ($request_method = [1] || $http_cookie ~* [2] || $arg_nocache [3] 1) { set $bypass_cache 1; }
All three conditions correctly check for cache bypass triggers.