Index: infusionBuilder-secure/php/postProcessor.php =================================================================== --- infusionBuilder-secure/php/postProcessor.php (revision 8946) +++ infusionBuilder-secure/php/postProcessor.php (working copy) @@ -216,10 +216,17 @@ $insert_query = "INSERT INTO cache (id, minified) VALUES('$cacheKey', ".$intMin.")"; $insert_result = mysql_query($insert_query); if (!$insert_result) { - returnError("Cannot insert cache entry for this build"); - exit(1); - } + + //check if the cache entry is already in place + $cache_query_again = "SELECT * FROM cache WHERE id = '{$cacheKey}' AND minified = ".$intMin; + $cache_result_again = mysql_query($cache_query_again); + if (!$cache_result_again) { + returnError("Cannot insert cache entry for this build"); + exit(1); + } + //if we reach here, cache entry is in place - continue. + } } //deliver file from cache location to user