Repository: joke2k/django-environ

Issue:
rediss URLs are not supported
If a cache URL scheme is `rediss://`, which is needed in order to connect over TLS, then a KeyError is thrown.

Discussion:

Patch:
diff --git a/README.rst b/README.rst
index 871a822..d71f87c 100644
--- a/README.rst
+++ b/README.rst
@@ -139,7 +139,7 @@ Supported types
     -  Memory: locmemcache://
     -  Memcached: memcache://
     -  Python memory: pymemcache://
-    -  Redis: rediscache://
+    -  Redis: rediscache://, redis://, or rediss://
 - search_url
     - ElasticSearch: elasticsearch://
     - Solr: solr://
diff --git a/environ/environ.py b/environ/environ.py
index ea4978c..12aa37f 100644
--- a/environ/environ.py
+++ b/environ/environ.py
@@ -90,6 +90,7 @@ class Env(object):
         'pymemcache': 'django.core.cache.backends.memcached.PyLibMCCache',
         'rediscache': REDIS_DRIVER,
         'redis': REDIS_DRIVER,
+        'rediss': REDIS_DRIVER,
     }
     _CACHE_BASE_OPTIONS = ['TIMEOUT', 'KEY_PREFIX', 'VERSION', 'KEY_FUNCTION', 'BINARY']
 


Test patch:
diff --git a/environ/test.py b/environ/test.py
index 2325816..5b7931e 100644
--- a/environ/test.py
+++ b/environ/test.py
@@ -563,6 +563,13 @@ class CacheTestSuite(unittest.TestCase):
             'DB': 0
         })
 
+    def test_rediss_parsing(self):
+        url = 'rediss://127.0.0.1:6379/1'
+        url = Env.cache_url_config(url)
+
+        self.assertEqual(url['BACKEND'], REDIS_DRIVER)
+        self.assertEqual(url['LOCATION'], 'rediss://127.0.0.1:6379/1')
+
     def test_options_parsing(self):
         url = 'filecache:///var/tmp/django_cache?timeout=60&max_entries=1000&cull_frequency=0'
         url = Env.cache_url_config(url)