diff --git a/lib/cache.js b/lib/cache.js
index <HASH>..<HASH> 100644
--- a/lib/cache.js
+++ b/lib/cache.js
@@ -17,7 +17,10 @@ module.exports = function(){
 	        key = req.originalUrl;
 
 	    redis.get(key,function(error,reply){
-	        if(!error && reply){
+	        if(error){
+	        	console.log('Error in caching layer:',error);
+	        	return next();
+	        }else if(reply){
 	        	res.set('Content-Type', 'application/json');
 	            res.end(reply);
 	        }else{
Improved caching layer in case of a redis failure