How to troubleshoot “Pragma: no-cache” with Concrete 5.6 on Debain?
Permalink
Hi There,
We have a few sites where the Response Headers have no caching which is interfering with CloudFlare's optimisation services.
We've created and served a blank.php file and the headers on that file state that caching is on - so we assume this means the server setup is correct and that something in php is causing the issue.
Does anyone know how to troubleshoot this issue?
Any help would be much appreciated.
Cheers
Ben
We have a few sites where the Response Headers have no caching which is interfering with CloudFlare's optimisation services.
We've created and served a blank.php file and the headers on that file state that caching is on - so we assume this means the server setup is correct and that something in php is causing the issue.
Does anyone know how to troubleshoot this issue?
Any help would be much appreciated.
Cheers
Ben
Do you have caching turned on in the Dashboard under System & Settings?
Thanks heaps for the reply,
Yes, under: /dashboard/system/optimization/cache/
We have block cache, overrides cache and full page caching set to on (see attached).
Cheers
Ben
Yes, under: /dashboard/system/optimization/cache/
We have block cache, overrides cache and full page caching set to on (see attached).
Cheers
Ben
Have also tried forcing things by adding this to site.php
header("Cache-Control: max-age=2592000"); //30days (60sec * 60min * 24hours * 30days)
Just bumping this as we're still a bit confused!
OK, we've had some help on this and it seems to be a block - probably a core block.
Enabling cache manually in all the custom blocks installed changed nothing but changing the default cache settings for the block object (in the core at: /concrete/core/libraries/block_controller.php) results in the correct output headers.
We're manually forcing page caching in the dashboard and will have to test and disable manually for each page if there are issues.
Does anyone know if there's a way to fix this properly without changing core files?
Cheers
Ben
Enabling cache manually in all the custom blocks installed changed nothing but changing the default cache settings for the block object (in the core at: /concrete/core/libraries/block_controller.php) results in the correct output headers.
protected $btCacheBlockRecord = true; protected $btCacheBlockOutput = true; protected $btCacheBlockOutputLifetime = 0; // until manually updated or cleared protected $btCacheBlockOutputOnPost = true; protected $btCacheBlockOutputForRegisteredUsers = true;
We're manually forcing page caching in the dashboard and will have to test and disable manually for each page if there are issues.
Does anyone know if there's a way to fix this properly without changing core files?
Cheers
Ben