How to turn off block cache while full page cached is turned on
Permalink
I need to turn page cache on as some pages have a very high traffic. however, for some specific blocks, I have to turn it off. e.g I have a review block on the page. when someone submits a review and get a thank you message, another browser opening the same page sees the same thank you message without submitting a review. I am not sure the way Concrete5.6 cache a page. I have having the code on the controller:
it does not work for me.
protected $btCacheBlockRecord = false; protected $btCacheBlockOutput = false; protected $btCacheBlockOutputOnPost = false; protected $btCacheBlockOutputForRegisteredUsers = false;
it does not work for me.
When you change those settings you need to go into the Dashboard -> Stacks & Blocks -> Block Types, find this block type, and click the "Refresh" button within the block details view. Once you do that this block will no longer cache. Just so you know, setting those that way will also make this whole page not cache, unfortunately that's just the way it works.