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.

Comments

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks!

  • DamienMcKenna committed 9f30e2e on 7.x-3.x
    Revert "Issue #2387885 by das-peter: Cache exported defaults."
    
    This...
damienmckenna’s picture

Status: Fixed » Needs work

Had to roll this back, it was causing problems.

das-peter’s picture

it was causing problems.

Could you elaborate a little bit more? I'd like to invest time to get this cached :)

damienmckenna’s picture

It 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.

das-peter’s picture

Status: Needs work » Needs review
StatusFileSize
new1.09 KB

Here'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.