diff --git a/plugins/cache/simple.inc b/plugins/cache/simple.inc
index 645c36a..82378bd 100644
--- a/plugins/cache/simple.inc
+++ b/plugins/cache/simple.inc
@@ -51,40 +51,36 @@ function panels_simple_cache_set_cache($conf, $content, $display, $args, $contex
  * Cache clears are always for an entire display, regardless of arguments.
  */
 function panels_simple_cache_clear_cache($display) {
-  $cid = 'panels_simple_cache';
+  $cid = panels_simple_cache_get_base_id($display);
+  cache_clear_all($cid, 'cache', TRUE);
+}
+
+
+/**
+ * Returns the base cache ID for a display.
+ *
+ * This is used for wildcard cache clearing.
+ *
+ * @see panels_simple_cache_get_id()
+ */
+function panels_simple_cache_get_base_id($display) {
+  $id = 'panels_simple_cache';
 
   // This is used in case this is an in-code display, which means did will be something like 'new-1'.
   if (isset($display->owner) && isset($display->owner->id)) {
-    $cid .= ':' . $display->owner->id;
+    $id .= ':' . $display->owner->id;
   }
-  $cid .= ':' . $display->did;
+  $id .= ':' . $display->did;
 
-  cache_clear_all($cid, 'cache', TRUE);
+  return $id;
 }
 
+
 /**
  * Figure out an id for our cache based upon input and settings.
  */
 function panels_simple_cache_get_id($conf, $display, $args, $contexts, $pane) {
-  $id = 'panels_simple_cache';
-
-  // If the panel is stored in the database it'll have a numeric did value.
-  if (is_numeric($display->did)) {
-    $id .= ':' . $display->did;
-  }
-  // Exported panels won't have a numeric did but may have a usable cache_key.
-  elseif (!empty($display->cache_key)) {
-    $id .= ':' . str_replace('panel_context:', '', $display->cache_key);
-  }
-  // Alternatively use the css_id.
-  elseif (!empty($display->css_id)) {
-    $id .= ':' . $display->css_id;
-  }
-  // Failover to just appending the did, which may be the completely unusable
-  // string 'new'.
-  else {
-    $id .= ':' . $display->did;
-  }
+  $id = panels_simple_cache_get_base_id($display);
 
   if ($pane) {
     $id .= ':' . $pane->pid;
@@ -95,28 +91,21 @@ function panels_simple_cache_get_id($conf, $display, $args, $contexts, $pane) {
   }
 
   switch ($conf['granularity']) {
+    case 'path_args':
+      $id .= ':' . md5(serialize(arg()));
+      break;
     case 'args':
-      foreach ($args as $arg) {
-        $id .= ':' . $arg;
-      }
+      $id .= ':' . md5(serialize($args));
       break;
-
     case 'context':
-      if (!is_array($contexts)) {
-        $contexts = array($contexts);
-      }
-      foreach ($contexts as $context) {
-        if (isset($context->argument)) {
-          $id .= ':' . $context->argument;
-        }
-      }
+      $id .= ':' . md5(serialize($contexts));
   }
   if (module_exists('locale')) {
     global $language;
     $id .= ':' . $language->language;
   }
 
-  if(!empty($pane->configuration['use_pager']) && !empty($_GET['page'])) {
+  if (!empty($pane->configuration['use_pager']) && !empty($_GET['page'])) {
     $id .= ':p' . check_plain($_GET['page']);
   }
 
@@ -136,11 +125,12 @@ function panels_simple_cache_settings_form($conf, $display, $pid) {
     '#title' => t('Granularity'),
     '#type' => 'select',
     '#options' => array(
+      'path_args' => t('URL'),
       'args' => t('Arguments'),
       'context' => t('Context'),
       'none' => t('None'),
     ),
-    '#description' => t('If "arguments" are selected, this content will be cached per individual argument to the entire display; if "contexts" are selected, this content will be cached per unique context in the pane or display; if "neither" there will be only one cache for this pane.'),
+    '#description' => t('If URL the content will be cached by individual URL that is currently used; if "arguments" are selected, this content will be cached per individual argument to the entire display; if "contexts" are selected, this content will be cached per unique context in the pane or display; if "neither" there will be only one cache for this pane.'),
     '#default_value' => $conf['granularity'],
   );
 
