It would be useful if mini panels were cached.

CommentFileSizeAuthor
#1 panels-n609626.patch1.13 KBdamienmckenna

Comments

damienmckenna’s picture

StatusFileSize
new1.13 KB

Here's something to get started. The first time it executes per page load it checks if result set was cached before and if so then just return that data; if nothing was cached previously, it compiles the mini_panels list per normal then saves the results to the cache and in a static variable. Subsequent function calls will have valid data in the static variable so just returns that.

damienmckenna’s picture

FYI this code was originally written by datacalibre, I just turned it into a patch.

damienmckenna’s picture

Status: Active » Needs review

Forgot to update the status.

merlinofchaos’s picture

I honestly don't see the value here.

damienmckenna’s picture

It's purely a performance thing, Datacaliber did some profiling on skinet.com prior to launch and found this patch shaved a few hundred ms off the page load. This works well with the caching engine (Panels plugin! Coming soon) that he built which gets logged-in page load on complex pages down really low.

damienmckenna’s picture

Status: Needs review » Needs work

This needs additional work as there's currently no provision for flushing the cache after modifications are made.

merlinofchaos’s picture

Status: Needs work » Needs review

http://drupal.org/node/732864 contains justification for this.

merlinofchaos’s picture

Status: Needs review » Fixed

I did this as part of retooling the Mini Panels UI to use CTools Export UI.

damienmckenna’s picture

Amazing stuff! Looking forward to the next release!

Status: Fixed » Closed (fixed)

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