By default panels assumes that you would never want to cache any displays / panes on a $_POST request.
This is quite an assumption, in some cases you might want the contents of a pane, or an entire display to be cached on a $_POST request (for example if it will display the exact same content regardless of GET or POST).

On some pages on our site (where we have a form and surrounding mini panels) - this is giving us a boost of around 2 seconds.

Patch to follow...

Comments

Title:Allow panel displays and pane to be cached on a POST requestAllow panel displays and panes to be cached on a POST request
Version:6.x-3.x-dev» 7.x-3.x-dev
StatusFileSize
new2.24 KB

Status:Needs review» Active

The patch in #1 also applies cleanly to 6.x-3.x branch

Status:Active» Needs review

Status:Active» Needs review

+++ b/includes/plugins.inc
@@ -41,8 +41,16 @@ function panels_get_regions($layout, $display) {
+    // Here we check if a caching plugin has implemented the ability to cache on $_POST requests.
+    // If it has we use what is selected for this display / pane, otherwise we revert back to the default
+    // of never caching on a POST request.

Comment exceeds 80chars.

Also patch does not set cache when $_POST is active.

StatusFileSize
new2.25 KB

Updated the patch to set the cache during post requests also + fixed the 80chars issue.