diff --git a/config/config.sample.php b/config/config.sample.php
index 288e3a01cff09c89c226f4c6fca1e7d7c910be48..02e5aba3e9460f8d315d6fb073861efa44e1c0f2 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -879,11 +879,16 @@ $CONFIG = array(
 
 /**
  * Connection details for redis to use for memory caching.
+ *
+ * For enhanced security it is recommended to configure Redis
+ * to require a password. See http://redis.io/topics/security
+ * for more information.
  */
 'redis' => array(
 	'host' => 'localhost', // can also be a unix domain socket: '/tmp/redis.sock'
 	'port' => 6379,
 	'timeout' => 0.0,
+	'password' => '', // Optional, if not defined no password will be used.
 	'dbindex' => 0, // Optional, if undefined SELECT will not run and will use Redis Server's default DB Index.
 ),
 
diff --git a/lib/private/memcache/redis.php b/lib/private/memcache/redis.php
index 21477798059828e3011af36646c40932e7fc9137..83be662eabf18fcb7c08448ec7d5dcc975e1cea6 100644
--- a/lib/private/memcache/redis.php
+++ b/lib/private/memcache/redis.php
@@ -56,6 +56,9 @@ class Redis extends Cache implements IMemcache {
 			}
 
 			self::$cache->connect($host, $port, $timeout);
+			if(isset($config['password']) && $config['password'] !== '') {
+				self::$cache->auth($config['password']);
+			}
 
 			if (isset($config['dbindex'])) {
 				self::$cache->select($config['dbindex']);