diff --git a/views/views_content_cache_plugin_cache.inc b/views/views_content_cache_plugin_cache.inc
index d14f884..0730910 100644
--- a/views/views_content_cache_plugin_cache.inc
+++ b/views/views_content_cache_plugin_cache.inc
@@ -171,4 +171,30 @@ class views_content_cache_plugin_cache extends views_plugin_cache {
 
     return $this->_results_key;
   }
+
+
+  function get_output_key() {
+    global $user;
+
+    if (!isset($this->_output_key)) {
+
+      // This is a fix for the build info not including the actual query run:
+      $key_data = array(
+        'execute_info' => $this->view->build_info,
+        'roles' => array_keys($user->roles),
+        'super-user' => $user->uid == 1, // special caching for super user.
+        'language' => $GLOBALS['language'],
+        'theme' => $GLOBALS['theme'],
+      );
+      foreach (array('exposed_info', 'page', 'sort', 'order') as $key) {
+        if (isset($_GET[$key])) {
+          $key_data[$key] = $_GET[$key];
+        }
+      }
+
+      $this->_output_key = $this->view->name . ':' . $this->display->id . ':results:' . md5(serialize($key_data));
+    }
+
+    return $this->_output_key;
+  }
 }
