Disable full page caching for new pages
Permalink
Hi all,
My global cache settings are set to 'Enable full page caching for all pages'. However, for some page types I don't want it to be enabled, so I tried to disable it via Page Type Defaults.
But... when I create a new page via composer, it just inherits the global cache settings, instead of those from the page type defaults.
So it seems like it's either a bug or I'm doing something wrong here.
Any thoughts?
Adri
My global cache settings are set to 'Enable full page caching for all pages'. However, for some page types I don't want it to be enabled, so I tried to disable it via Page Type Defaults.
But... when I create a new page via composer, it just inherits the global cache settings, instead of those from the page type defaults.
So it seems like it's either a bug or I'm doing something wrong here.
Any thoughts?
Adri
I did some research in /core/libraries/page_cache/library.php
The "shouldAddToCache" method checks controller->supportsPageCache, but only for generated collections. From my understanding there isn't a controller method to disable full page caching. (so adding a page type controller won't fix the issue)
I've tested adding a page via composer and via 'Add subpage', both don't inherit speed settings from the Page Type. Both use /core/libraries/page.php -> function add().
So I guess some stuff is missing in that insert query, especially the column 'cCacheFullPageContent'.
The "shouldAddToCache" method checks controller->supportsPageCache, but only for generated collections. From my understanding there isn't a controller method to disable full page caching. (so adding a page type controller won't fix the issue)
I've tested adding a page via composer and via 'Add subpage', both don't inherit speed settings from the Page Type. Both use /core/libraries/page.php -> function add().
So I guess some stuff is missing in that insert query, especially the column 'cCacheFullPageContent'.
Caching in concrete5 has many quirks that some would consider bugs whilst others consider them features.
Neither the page cache or the block cache behave the way I would initially expect them to with page type defaults (I say initially, because once you become familiar, the behaviour is predictable, just not always helpful).