Skip to content

Commit b0f1cd6

Browse files
committed
Remove cache helper prefix
1 parent ea376cc commit b0f1cd6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cache_helper/utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
from cache_helper.exceptions import CacheKeyCreationError
66
from cache_helper.interfaces import CacheHelperCacheable
77

8-
DJANGO_CACHE_HELPER_PREFIX = 'django_cache_helper'
9-
108

119
def get_function_cache_key(func_name, func_type, func_args, func_kwargs):
1210
if func_type in ['method', 'function']:
@@ -23,9 +21,8 @@ def get_function_cache_key(func_name, func_type, func_args, func_kwargs):
2321
def get_final_cache_key(key):
2422
"""
2523
Given the intermediate key produced by a function call along with its args + kwargs,
26-
prepends the DJANGO_CACHE_HELPER_PREFIX and then performs a sha256 hash, and returns the result
24+
performs a sha256 hash on the utf-8 encoded version of the key, and returns the result
2725
"""
28-
key = '{cache_helper_prefix}:{key}'.format(cache_helper_prefix=DJANGO_CACHE_HELPER_PREFIX, key=key)
2926
key_hash = sha256(key.encode('utf-8')).hexdigest()
3027
return key_hash
3128

0 commit comments

Comments
 (0)