diff --git a/boards/utils.py b/boards/utils.py --- a/boards/utils.py +++ b/boards/utils.py @@ -19,8 +19,6 @@ from neboard import settings from boards.abstracts.constants import FILE_DIRECTORY from boards.settings import get_bool, SECTION_FORMS -CACHE_KEY_DELIMITER = '_' - HTTP_FORWARDED = 'HTTP_X_FORWARDED_FOR' META_REMOTE_ADDR = 'REMOTE_ADDR' @@ -31,7 +29,9 @@ ANON_IP = '127.0.0.1' FILE_EXTENSION_DELIMITER = '.' URL_DELIMITER = '/' -CACHE_KEY_DELIMITER = ':' + +CACHE_PARAMS = '{}:{}' +CACHE_KEY_DELIMITER = '_' DEFAULT_MIMETYPE = 'application/octet-stream' @@ -71,7 +71,7 @@ def cached_result(key_method=None): cache_key_params += args for key, value in kwargs: - cache_key_params.append(key + CACHE_KEY_DELIMITER + value) + cache_key_params.append(CACHE_PARAMS.format(key, value)) if isinstance(obj, Model): cache_key_params.append(str(obj.id))