Block caching
Permalink
Block caching is quite well explained under
API
https://documentation.concrete5.org/developers/working-with-blocks/c...
CMS
https://documentation.concrete5.org/editors/dashboard/system-and-mai...
I'm somewhat unclear though if that means, that Block caching is only activated at all if in the CMS the block cache is activated and only then is it relevant what options are given in the PHP code, or if the config in the PHP code in the blocks is superseding any setting in the CMS.
Basically... if I activate block caching in a block, do I also need to activate it in the CMS to make it work? I guess the answer is yes?
And almost more important: Can Single Pages use these parameters and also profit from block caching?
API
https://documentation.concrete5.org/developers/working-with-blocks/c...
CMS
https://documentation.concrete5.org/editors/dashboard/system-and-mai...
I'm somewhat unclear though if that means, that Block caching is only activated at all if in the CMS the block cache is activated and only then is it relevant what options are given in the PHP code, or if the config in the PHP code in the blocks is superseding any setting in the CMS.
Basically... if I activate block caching in a block, do I also need to activate it in the CMS to make it work? I guess the answer is yes?
And almost more important: Can Single Pages use these parameters and also profit from block caching?
Second part, single pages.
Any block that is edited/viewed through a page area or stack can be cached, including page areas within single pages and blocks in stacks that have been hard coded into a page..
Blocks hard-coded directly into a page are not cached (but there is an addon by a3020 that can cache hard coded blocks).
Any block that is edited/viewed through a page area or stack can be cached, including page areas within single pages and blocks in stacks that have been hard coded into a page..
Blocks hard-coded directly into a page are not cached (but there is an addon by a3020 that can cache hard coded blocks).
I think I mean it the opposite way. I mean, if Single Pages themselves can be cached.
Can I attach the same code to manage block caching to e.g.: application/controllers/single_page/mysinglepage.php and it will cache the contents of this page?
Can I attach the same code to manage block caching to e.g.: application/controllers/single_page/mysinglepage.php and it will cache the contents of this page?
No. Block cache is for blocks only.
If you put similar properties in a single page controller, they will be completely ignored.
If you put similar properties in a single page controller, they will be completely ignored.
Thank you! Any way I can cache those pages?
Generally with single pages you don't want them cached. You would probably need to use an external cache system and configure it to handle paths that include the base of the single page.
Usually this problem is the other way round. Site owners ask why their single pages don't work and it turns out they had a cache in front of it that needs to be disabled :-)
Usually this problem is the other way round. Site owners ask why their single pages don't work and it turns out they had a cache in front of it that needs to be disabled :-)
Thanks for that one, so works like I thought, that's great.
Is how it works. The dashboard settings enable the block cache. Block controller settings decide how a block is cached when the block cache is enabled. Advanced block settings menu then gives you a chance to override a block controller's settings.