Index: plugins/display_renderers/panels_renderer_legacy.class.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/display_renderers/Attic/panels_renderer_legacy.class.php,v
retrieving revision 1.1.2.23
diff -u -p -r1.1.2.23 panels_renderer_legacy.class.php
--- plugins/display_renderers/panels_renderer_legacy.class.php	6 Nov 2010 17:21:00 -0000	1.1.2.23
+++ plugins/display_renderers/panels_renderer_legacy.class.php	17 Feb 2011 19:53:31 -0000
@@ -220,13 +220,16 @@ class panels_renderer_legacy {
       $content = $cache->content;
     }
     else {
+      if ($caching) {
+        // Take snapshot before rendering content.
+        $cache = new panels_cache_object();
+      }
       $content = ctools_content_render($pane->type, $pane->subtype, $pane->configuration, array(), $this->display->args, $this->display->context);
       foreach (module_implements('panels_pane_content_alter') as $module) {
         $function = $module . '_panels_pane_content_alter';
         $function($content, $pane, $this->display->args, $this->display->context);
       }
       if ($caching) {
-        $cache = new panels_cache_object();
         $cache->set_content($content);
         panels_set_cached_content($cache, $this->display, $this->display->args, $this->display->context, $pane);
         $content = $cache->content;
Index: plugins/display_renderers/panels_renderer_standard.class.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/panels/plugins/display_renderers/panels_renderer_standard.class.php,v
retrieving revision 1.1.2.32
diff -u -p -r1.1.2.32 panels_renderer_standard.class.php
--- plugins/display_renderers/panels_renderer_standard.class.php	12 Jan 2011 23:48:44 -0000	1.1.2.32
+++ plugins/display_renderers/panels_renderer_standard.class.php	17 Feb 2011 19:53:32 -0000
@@ -537,13 +537,16 @@ class panels_renderer_standard {
       $content = $cache->content;
     }
     else {
+      if ($caching) {
+        // Take snapshot before rendering content.
+        $cache = new panels_cache_object();
+      }
       $content = ctools_content_render($pane->type, $pane->subtype, $pane->configuration, array(), $this->display->args, $this->display->context);
       foreach (module_implements('panels_pane_content_alter') as $module) {
         $function = $module . '_panels_pane_content_alter';
         $function($content, $pane, $this->display->args, $this->display->context);
       }
       if ($caching) {
-        $cache = new panels_cache_object();
         $cache->set_content($content);
         panels_set_cached_content($cache, $this->display, $this->display->args, $this->display->context, $pane);
         $content = $cache->content;
