EE with redis or wpfc and Soliloquy Slider Carousel


We’ve uncovered an interesting problem when using Soliloquy Carousel with --redis or --wpfc

Basically soliloquy controls if a slider will be a full slider or carousel slider based on a css class. After a full flush the first device hitting the page (home page ughhh - tough one here) will set the class. Soliloquy behaviour is: on mobile to drop the class for carousel so rather than a carousel slider it is a single slide slider. If the first device to hit is a mobile, you end up with a single slide slider instead of a carousel. If it is large viewport / desktop you get the carousel


<div class="soliloquy-outer-container soliloquy-carousel" data-soliloquy-loaded="1"

we get a carousel slider, because first device was a large viewport / desktop and class soliloquy-carousel is present; and this is cached.

However, if the first device is a mobile, we get

<div class="soliloquy-outer-container" data-soliloquy-loaded="1"

which is cached and therefore on large viewport / desktop you still have a single slide slider instead of carousel.

Any ideas on how to either not cache this portion (done via a widget as this is a custom genesis wigetised style page); which I know go against the whole full page cache nature of EE. Perhaps a very small cache period just for the home page (seconds?) but that’s difficult because we use CloudFront as well or what … any ideas how to work around this?

For now we’ve had to go to --wp (we use WP Rocket for things like CDN, lazy loads, etcs - a lot of the functionality is useful and contained in one plugin rather than many, and tbh w3tc seems almost abondware these days and rocket is so much easier to deal with - but that’s a side issue); so we still have some caching at least. For some reason Rocket’s page cache doesn’t do this, with soliloquy so maybe they’ve dealt with Soliloquy specifically. Or perhaps it’s that the widget is being cached to redis or memcached depending on --redis or --wpfc ?

Ultimately we’d love --wpredis --php7 AND rocket; that’s to say would love for EE to support Rocket out of the Box with full integration and be able to handle scenarios like this carousel issue and I know that’s touchy subject so that’s probably for later; but for now does any one have any ideas ?

I know there’s been discussions on here about Rocket and being paid and therefore rtCamp can’t really investigate that; however, I think there’s a ton of users out there that like Rocket for simplicity but power in a simple to use plugin so it may be time to re-open or re-investigate EE + Redis + Rocket.

The site in question is in case anyone is interested.

Thanks community!

Thanks very much for the response, looks interesting what you and MiteshShah posted. Shall have a look.