We have a site that has "normal" blocks as well as Mini Panels. Due to the way Mini Panels works (and referencing this issue: http://drupal.org/node/574292), we have had to disable all block caching. I completely understand why we would not want to use block caching for the Mini Panels, however we do want to have our other blocks cached by the standard block caching mechanism. Attached is a stupid-simple patch against 6.x-3.x-dev that just disables block caching for Mini Panel blocks. This would allow us to keep using block caching for our other blocks while allowing the actual Panels/CTools caching mechanisms to work for Mini Panels.

Comments

mgriego’s picture

Version: 6.x-3.3 » 6.x-3.x-dev
mgriego’s picture

Status: Active » Needs review
mgriego’s picture

Status: Needs review » Active
mgriego’s picture

Status: Active » Needs review
StatusFileSize
new447 bytes

Reattaching patch with proper naming convention and status.

merlinofchaos’s picture

Awesome, I was thinking this needed to happen, so it's good to see a patch for it. Will try to review this when I get a chance.

mgriego’s picture

Also, it would be good to add an update hook into panels_mini.install to either run _block_rehash() for each active theme, or, perhaps easier, just update the blocks table directly as in panels_mini_update_6300() to set cache to -1, which I guess would look like this:

function panels_mini_update_6301() {
  $ret = array();
  $ret[] = update_sql("UPDATE {blocks} SET cache = -1 WHERE module = 'panels_mini'");
  return $ret;
}

This allows the proper settings to take affect for existing sites.

mgriego’s picture

We have this running in production, and it has allowed us to re-enable block caching with no adverse affects.

mgriego’s picture

Status: Needs review » Reviewed & tested by the community
sdboyer’s picture

Status: Reviewed & tested by the community » Fixed

Looks good, committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drumrwaldo’s picture

I hope this is proper etiquette on here, but I was having the same issue described here (or so I thought: two-column layout is displayed as two rows) so applied the patch. I've verified the patch was applied and am using the appropriate panels version, but the behavior of my mini panels is as before. After patching the module and flushing the cache, my mini-panels displayed correctly for the first few page loads but now the issue is as before. Glad to provide any additional information if it would help, and again my apologies if it's not proper protocol to re-address a closed item. Thanks in advance for the help!

mgriego’s picture

It sounds like you did not upgrade to a new version of Panels and chose to patch the module instead. Did you include the code from #6 as well and run update.php?

drumrwaldo’s picture

You're right, I misread and thought the patch was applicable to the newest version of Panels. Updating the module and running update.php seems to have taken care of it. Thanks for taking the time to answer a stupid question!