Post Grid Disappears - Visual Composer

As of WP Rocket version 2.8.15, we have added automatic compatibility with Visual Composer's Post Grid

For versions prior to 2.8.15, please follow the below instructions. 

When using the Visual Composer plugin (and any plugin/theme that uses a nonce as described below), there are some modules, most notably the Post Grid, which require special attention when caching.

The Problem

Seemingly randomly the post grid doesn't load and you have a blank space on your page. After you clear the cache, the page displays correctly. 

The Solution

In the Basic Options tab of WP Rocket, set " Clear Cache Lifespan" to 10 hours.

The Cause 

The reason is that this module from Visual Composer uses an AJAX call with a  "nonce" ( https://codex.wordpress.org/WordPress_Nonces) to display the posts. A nonce is a security token printed into the HTML. It's only valid for a certain length of time. When you have caching, the nonce expires in the background, but the code on the page is still there—referencing an invalid nonce, so then things break. After the cache is cleared, the code is regenerated and references a correct nonce again.