diff -ruN original/views/views_content_cache_plugin_cache.inc mod/views/views_content_cache_plugin_cache.inc
--- original/views/views_content_cache_plugin_cache.inc	2010-07-24 20:44:24.000000000 +0700
+++ mod/views/views_content_cache_plugin_cache.inc	2011-10-18 15:16:51.000000000 +0700
@@ -13,6 +13,11 @@
     $options['output_min_lifespan'] = 21600;
     $options['output_max_lifespan'] = 21600;
     $options['keys'] = array();
+    $options['segmentation'] = array(
+      'roles' => 'roles',
+      'super-user' => 'super-user',
+      'language' => 'language',
+    );
   }
 
   function options_form(&$form, &$form_state) {
@@ -26,6 +31,18 @@
       $form['keys'][$key_id] = $plugin->options_form($option_value);
     }
 
+    $form['segmentation'] = array(
+      '#title' => t('Cache segmentation'),
+      '#description' => t("Each enabled criterion means different cache for visitors with different values. Be careful when disabling segmentation criteria! For example, wrong segmentation settings will show administration links to anonimous users."),
+      '#type' => 'checkboxes',
+      '#options' => array(
+        'roles' => t('Roles'),
+        'super-user' => t('Super user'),
+        'language' => t('Language'),
+      ),
+      '#default_value' => $this->options['segmentation'],
+    );
+    
     $options = array(60, 300, 1800, 3600, 21600, 518400);
     $options = drupal_map_assoc($options, 'format_interval');
     $options = array(-1 => t('None')) + $options;
@@ -100,4 +117,69 @@
     }
     return $cutoff;
   }
+
+  /**
+   * Returns optional key data components increasing cache segmentation for both
+   * results and output caches.
+   *
+   * @return array
+   */
+  function get_optional_key_data() {
+    global $user;
+    
+    $key_data = array();
+    if (!empty($this->options['segmentation']['roles'])) {
+      $key_data['roles'] = array_keys($user->roles);
+    }
+    if (!empty($this->options['segmentation']['super-user'])) {
+      $key_data['super-user'] = $user->uid == 1; // special caching for super user.
+    }
+    if (!empty($this->options['segmentation']['language'])) {
+      $key_data['language'] = $GLOBALS['language'];
+    }
+    return $key_data;
+  }
+
+  /**
+   * Returns results cache key.
+   *
+   * @return string
+   */
+  function get_results_key() {
+    if (!isset($this->_results_key)) {
+      $key_data = array(
+        'build_info' => $this->view->build_info,
+      );
+      $key_data += $this->get_optional_key_data();
+      
+      foreach (array('exposed_info', 'page', 'sort', 'order') as $key) {
+        if (isset($_GET[$key])) {
+          $key_data[$key] = $_GET[$key];
+        }
+      }
+
+      $this->_results_key = $this->view->name . ':' . $this->display->id . ':results:' . md5(serialize($key_data));
+    }
+
+    return $this->_results_key;
+  }
+
+  /**
+   * Returns output cache key.
+   *
+   * @return string
+   */
+  function get_output_key() {
+    if (!isset($this->_output_key)) {
+      $key_data = array(
+        'result' => $this->view->result,
+        'theme' => $GLOBALS['theme'],
+      );
+      $key_data += $this->get_optional_key_data();
+
+      $this->_output_key = $this->view->name . ':' . $this->display->id . ':output:' . md5(serialize($key_data));
+    }
+
+    return $this->_output_key;
+  }
 }
