diff --git a/README.txt b/README.txt
index ba1e03c..1014f0f 100644
--- a/README.txt
+++ b/README.txt
@@ -1,2 +1,17 @@
 The git_deploy module requires the git command to be executable by the
 webserver.
+
+An alternative to using git_deploy is to install modules and themes using the
+"drush pm-download" command with options "--package-handler=git_drupalorg
+--gitinfofile". This performs a git clone and checkout and then inserts the
+desired version information into the .info file. The "drush make" command will
+automatically write packaging information without additional options.
+
+If you use this module for several sites on the same machine, you can make use of the
+shared file cache by adding this or something like it to your settings file:
+
+$conf['git_deploy_tmpdir'] = '/tmp/git_deploy/';
+
+The git status is also saved in a (site-specific) cache bin called
+cache_git_deploy, in case you want to use an alternative backend for your
+particular instance.
diff --git a/git_deploy.install b/git_deploy.install
index eb66c85..2db00ec 100644
--- a/git_deploy.install
+++ b/git_deploy.install
@@ -11,3 +11,27 @@ function git_deploy_requirements($phase) {
   }
   return $requirements;
 }
+
+
+/**
+ * Implementation of hook_schema().
+ *
+ */
+function git_deploy_schema() {
+  $table = drupal_get_schema_unprocessed('system', 'cache');
+  $table['description'] = 'Cache table for git deploy to store exec command results.';
+  $schema = array('cache_git_deploy' => $table);
+  return $schema;
+}
+
+/**
+ * Add a separate cache table.
+ */
+function git_deploy_update_7001() {
+  if (!db_table_exists('cache_git_deploy')) {
+    $table = drupal_get_schema_unprocessed('system', 'cache');
+    $table['description'] = 'Cache table for git deploy to store exec command results.';
+    db_create_table('cache_git_deploy', $table);
+  }
+}
+
diff --git a/git_deploy.module b/git_deploy.module
index 661dc7e..9f4be7c 100644
--- a/git_deploy.module
+++ b/git_deploy.module
@@ -23,13 +23,22 @@ function git_deploy_system_info_alter(&$info, $file, $type = NULL) {
     $directory = dirname($file->uri);
     // Check whether this belongs to core. Speed optimization.
     if (substr($directory, 0, strlen($type)) != $type) {
-      while ($directory && !is_dir("$directory/.git")) {
+      while ($directory && !file_exists("$directory/.git")) {
         $directory = substr($directory, 0,  strrpos($directory, '/'));
       }
       $git_dir = "$directory/.git";
       // Theoretically /.git could exist.
-      if ($directory && is_dir($git_dir)) {
+      if ($directory && file_exists($git_dir)) {
         $git = "git --git-dir $git_dir";
+        // Get cached values and return ASAP.
+        exec("$git rev-parse --verify HEAD 2>&1", $head_hash);
+        $head_hash = $head_hash[0];
+        if ($cache = _git_deploy_cache_get("git_deploy:$directory:$head_hash")) {
+          foreach (array('datestamp', 'project', 'version') as $key) {
+            $info[$key] = isset($cache->data[$key]) ? $cache->data[$key] : NULL;
+          }
+          return;
+        }
         // Find first the project name based on fetch URL.
         // Eat error messages. >& is valid on Windows, too. Also, $output does
         // not need initialization because it's taken by reference.
@@ -81,7 +90,40 @@ function git_deploy_system_info_alter(&$info, $file, $type = NULL) {
         if ($datestamp && is_numeric($datestamp[0])) {
           $info['datestamp'] = $datestamp[0];
         }
+        // Save values into cache.
+        $cache_data = array();
+        foreach (array('datestamp', 'project', 'version') as $key) {
+          $cache_data[$key] = isset($info[$key]) ? $info[$key] : NULL;
+        }
+        _git_deploy_cache_set("git_deploy:$directory:$head_hash", $cache_data);
+      }
+    }
+  }
+}
+
+function _git_deploy_cache_get($cid) {
+  $cache_object = cache_get($cid);
+  if (empty($cache_object)) {
+    // if set, try and get it from the shared file cache
+    if ($tmpdir = variable_get('git_deploy_tmpdir','')) {
+      if (!is_dir($tmpdir)) {
+        mkdir($tmpdir);
+      }
+      $tmpfid = str_replace(array(':','/'),'-',$cid);
+      if ($cache_data = @file_get_contents($tmpdir.$tmpfid)) {
+        cache_set($cid,unserialize($cache_data));
+        $cache_object = cache_get($cid);
       }
     }
   }
+  return $cache_object;
+}
+  
+
+function _git_deploy_cache_set($cid, $data) {
+  cache_set($cid,$data);
+  if ($tmpdir = variable_get('git_deploy_tmpdir','')) {
+    $tmpfid = str_replace(array(':','/'),'-',$cid);
+    file_put_contents($tmpdir.$tmpfid,serialize($data)); 
+  }
 }
