Exclude specific user roles from logged-in cache
When the "Cache logged in users" option is enabled in FlyingPress, it creates separate cache versions for each user role. To specifically exclude certain user roles from being cached, use the flying_press_cache_excluded_roles filter
Exclude admins and shop managers
Exclude admins and shop managers
add_filter('flying_press_cache_excluded_roles', function ($roles) {
$roles = ['administrator', 'shop-manager']; // Specify roles to exclude
return $roles;
});
Updated on: 18/12/2023
Thank you!