Possible to configure nginx to ignore cache for logged in users in certain roles only?
Here is what I ended up doing: // Set disable cache for certain roles add_action(‘init’, ‘add_custom_cookie_admin’); function add_custom_cookie_admin() { if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); $thisrole = $current_user->roles[0]; if($thisrole !== ‘subscriber’) { setcookie(“disable_cache”, $current_user->user_login, time()+43200, COOKIEPATH, COOKIE_DOMAIN); } } } // and then remove the cookie on logout function clear_custom_cookie_on_logout() { unset($_COOKIE[“disable_cache”]); setcookie( … Read more