Problem/Motivation
Currently the panelizer_defaults don't use the caching mechanism for ctools exportable defaults.
This can causes the defaults to be load on every (uncached) page request.
Unless there's a specific reason why the caching is disabled I suggest to enable the caching to enhance the performance.
Proposed resolution
Simply add 'cache defaults' => TRUE, to the export key in the schema definition of panelizer_defaults.
We might also could introduce an own cache bin for panelizer - as it is recommended in the ctools documentation.
This could be handy for other stuff as well.
Remaining tasks
Reviews needed.
User interface changes
None.
API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | panelizer-use-ctools-exportables-caching-2387885-8.patch | 1.09 KB | das-peter |
Comments
Comment #2
damienmckennaCommitted. Thanks!
Comment #5
damienmckennaHad to roll this back, it was causing problems.
Comment #6
das-peter commentedCould you elaborate a little bit more? I'd like to invest time to get this cached :)
Comment #7
damienmckennaIt somehow broke the ability to panelize a content type, I had to clear the caches for the changes to be picked up; you can see this by enabling Panelizer for a content type via the content type's settings page, then noting that admin/structure/types doesn't add the Panelizer link for the content type. Obviously it just needs to find the right cache key and clear it, but I ran out of time.
Comment #8
das-peter commentedHere's an updated patch that flushed the ctools plugins cache so that
panelizer_entity_plugin_process()runs again and can add the newly configured bundle.I'm not sure if this is enough in general, since in the panelizer settings page a full blown cache clear is done. But I think just for the plugins cache we aim to use here it's enough.
Comment #9
das-peter commentedOh wait, just now I realize this could be related to this too: #1719090: Panelizer triggers CTools file scans for finding all plugins on all panelized pages