summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2019-01-18 10:14:41 -0500
committerGitHub <noreply@github.com>2019-01-18 10:14:41 -0500
commitfe6d5a2da2ee0430a8fd7360816e6a3e4f843703 (patch)
treeede903e5991d7bd21783eadae97e5b6914efe018
parent6713926ebe22172e50f283185f969275c326416d (diff)
Fixed #30107 -- Removed unused dirs variable from cache template loader keys.
Unused since 5d8da093a974f41e08573bbe0d32d5ffeaadd0ad.
-rw-r--r--django/template/loaders/cached.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/template/loaders/cached.py b/django/template/loaders/cached.py
index 8d67ae2566..fcd2bc080b 100644
--- a/django/template/loaders/cached.py
+++ b/django/template/loaders/cached.py
@@ -66,7 +66,7 @@ class Loader(BaseLoader):
def cache_key(self, template_name, skip=None):
"""
- Generate a cache key for the template name, dirs, and skip.
+ Generate a cache key for the template name and skip.
If skip is provided, only origins that match template_name are included
in the cache key. This ensures each template is only parsed and cached
@@ -76,7 +76,6 @@ class Loader(BaseLoader):
y -> a -> a
z -> a -> a
"""
- dirs_prefix = ''
skip_prefix = ''
if skip:
@@ -84,7 +83,7 @@ class Loader(BaseLoader):
if matching:
skip_prefix = self.generate_hash(matching)
- return '-'.join(s for s in (str(template_name), skip_prefix, dirs_prefix) if s)
+ return '-'.join(s for s in (str(template_name), skip_prefix) if s)
def generate_hash(self, values):
return hashlib.sha1('|'.join(values).encode()).hexdigest()