diff --git a/public_html/deployment/classes/cache.class_config.php b/public_html/deployment/classes/cache.class_config.php
index eac6822137a7b09866cab6bbe6b4412029cca17d..db12e25c96f8e0d8142098ecd92f7c24ad2d5577 100644
--- a/public_html/deployment/classes/cache.class_config.php
+++ b/public_html/deployment/classes/cache.class_config.php
@@ -4,7 +4,7 @@
  */
 
 // set a custom cache direcory
-// $this->_sCacheDir="/tmp/ahcache";
+$this->_sCacheDir="/var/tmp/ahcache";
 
 // if you have a large number of items to cache:
 // you can limit the files per cache subdir in an indirect way
diff --git a/public_html/deployment/classes/vcs.git.class.php b/public_html/deployment/classes/vcs.git.class.php
index c6f57fce06784e5c14055f2422962c60be20b00d..b7bb0bcafcb7ecaea11eea7b1234f3fd665b6e37 100644
--- a/public_html/deployment/classes/vcs.git.class.php
+++ b/public_html/deployment/classes/vcs.git.class.php
@@ -311,9 +311,11 @@ class vcs implements iVcs {
         }
         // try to get infos from the cache
         if (
-                (array_key_exists($sBranch, $this->_aRemoteBranches) && $sVerifyRevision && $this->_aRemoteBranches[$sBranch]['revision'] == $sVerifyRevision
-                ) ||
-                (array_key_exists($sBranch, $this->_aRemoteBranches) && !$sVerifyRevision
+                is_array($this->_aRemoteBranches)
+                && (
+                   array_key_exists($sBranch, $this->_aRemoteBranches) && $sVerifyRevision && $this->_aRemoteBranches[$sBranch]['revision'] == $sVerifyRevision
+                   ||
+                   array_key_exists($sBranch, $this->_aRemoteBranches) && !$sVerifyRevision
                 )
         ) {
             // it is up to date - doing nothing
diff --git a/shellscripts/cron_cache_gitbranches.php b/shellscripts/cron_cache_gitbranches.php
new file mode 100644
index 0000000000000000000000000000000000000000..837efb1da2ff49781ff722df36c738e71c1fdefe
--- /dev/null
+++ b/shellscripts/cron_cache_gitbranches.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * 
+ * CRONJOB
+ * cache all git branches
+ * 
+ */
+
+// http://iml:deployment@ci.iml.unibe.ch/deployment/?prj=ci&action=deploy&par3=preview&confirm=1
+
+$sDocroot = (dirname(__dir__)) . "/public_html";
+
+require_once("$sDocroot/deployment/classes/logger.class.php");
+global $oCLog;
+$oCLog = new logger();
+
+require_once("$sDocroot/../config/inc_projects_config.php");
+require_once("$sDocroot/deployment/inc_functions.php");
+require_once("$sDocroot/deployment/classes/project.class.php");
+
+$oPrj1 = new project();
+
+echo "<h1>===== IMLDEPLOYMENT - cache git branches =====</h1>\n";
+foreach ($oPrj1->getProjects() as $sPrj) {
+    $oPrj = new project($sPrj);
+    
+    echo "----- $sPrj:\n";
+    foreach($oPrj->getRemoteBranches() as $aBranch){
+        echo $aBranch['revision']." ".$aBranch['label'] . "<br>\n";
+    }
+    echo "<br>\n";
+}
+echo "done\n";