I have separate caches for mobile and desktop users and my implementation was working properly until my website began experiencing high traffic. Now, randomly my mobile users will see the desktop view of the site. I'm using W3 total cache and nginx. I borrowed heavily from here: https://miteshshah.github.io/linux/nginx/how-to-setup-separate-nginx-fastcgi-cache-for-mobile-and-desktop-users/ but still no luck. Any pointers?
Also, I use wp_is_mobile to insert advertisements after every n-paragraphs in my single posts. The difference between desktop and mobile is that I use different "n" value for desktop and mobile users.