diff --git a/README.txt b/README.txt
index 98d181e..29b1b65 100644
--- a/README.txt
+++ b/README.txt
@@ -6,3 +6,12 @@ An alternative to using git_deploy is to install modules and themes using the
 --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_tmp_dir'] = '/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..e23f47c 100644
--- a/git_deploy.install
+++ b/git_deploy.install
@@ -1,13 +1,54 @@
 <?php
 
+/**
+ * Implements hook_requirements().
+ */
 function git_deploy_requirements($phase) {
   $requirements = array();
   if ($phase == 'runtime') {
-    $requirements['git'] = array(
-      'title' => t('git binary'),
-      'value' => t('The git binary is present and executable'),
+    $requirements['git_deploy_git_binary'] = array(
+      'title' => t('Git binary'),
+      'value' => t('The Git binary is present and executable'),
       'severity' => function_exists('exec') && exec('git') ? REQUIREMENT_OK : REQUIREMENT_ERROR,
     );
+
+    if ($tmp_dir = variable_get('git_deploy_tmp_dir')) {
+      $requirements['git_deploy_tmp_dir'] = array(
+        'title' => t('Git deploy - Shared cache directory'),
+        'value' => t('The shared Git deploy temporary directory is exists and writable.'),
+        'severity' => is_dir($tmp_dir) && is_writable($tmp_dir) ? REQUIREMENT_OK : REQUIREMENT_ERROR,
+      );
+    }
   }
+
   return $requirements;
 }
+
+/**
+ * Implements hook_uninstall().
+ */
+function git_deploy_uninstall() {
+  variable_del('git_deploy_tmp_dir');
+}
+
+/**
+ * Implements 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 e35ff7c..ed122d9 100644
--- a/git_deploy.module
+++ b/git_deploy.module
@@ -2,20 +2,20 @@
 
 /**
  * @file
- *
  * This module add versioning information to projects checked out of git.
  */
 
 /**
- * Implement hook_system_info_alter() to provide metadata to drupal from git.
+ * Implement hook_system_info_alter().
  *
- * We support populating $info['version'] and $info['project'].
+ * Provide metadata to drupal from git. We support populating $info['version'],
+ * $info['project'] and $info['datestamp'].
  *
- * @param $info
+ * @param array $info
  *   The module/theme info array we're altering.
- * @param $file
+ * @param object $file
  *   An object describing the filesystem location of the module/theme.
- * @param $type
+ * @param string $type
  *   Can be module or theme.
  */
 function git_deploy_system_info_alter(&$info, $file, $type = NULL) {
@@ -30,6 +30,19 @@ function git_deploy_system_info_alter(&$info, $file, $type = NULL) {
       // Theoretically /.git could exist.
       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];
+        $cache_id = "git_deploy:$directory:$head_hash";
+        if ($cache = _git_deploy_cache_get($cache_id)) {
+          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 +94,49 @@ 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($cache_id, $cache_data);
+      }
+    }
+  }
+}
+
+function _git_deploy_cache_get($cache_id) {
+  static $cache_objects = array();
+
+  if (!array_key_exists($cache_id, $cache_objects)) {
+    $cache_bin = 'cache_git_deploy';
+    $cache_objects[$cache_id] = cache_get($cache_id, $cache_bin);
+    if (empty($cache_objects[$cache_id])) {
+      // If set, try and get it from the shared file cache.
+      if ($tmp_dir = variable_get('git_deploy_tmp_dir', '')) {
+        $tmp_file_name = str_replace(array(':', '/'), '-', $cache_id);
+        if (is_file("$tmp_dir/$tmp_file_name")
+          && is_readable("$tmp_dir/$tmp_file_name")
+          && ($cache_data = file_get_contents("$tmp_dir/$tmp_file_name"))
+        ) {
+          cache_set($cache_id, unserialize($cache_data), $cache_bin);
+          $cache_objects[$cache_id] = cache_get($cache_id, $cache_bin);
+        }
       }
     }
   }
+
+  return $cache_objects[$cache_id];
+}
+
+function _git_deploy_cache_set($cache_id, $cache_data) {
+  $cache_bin = 'cache_git_deploy';
+  cache_set($cache_id, $cache_data, $cache_bin);
+  if ($tmp_dir = variable_get('git_deploy_tmp_dir', '')) {
+    $tmp_file_name = str_replace(array(':', '/'), '-', $cache_id);
+    if (is_dir($tmp_dir) || file_prepare_directory($tmp_dir, FILE_CREATE_DIRECTORY)) {
+      file_put_contents("$tmp_dir/$tmp_file_name", serialize($cache_data));
+    }
+  }
 }
