Changes between Initial Version and Version 1 of Ticket #24035
- Timestamp:
- Dec 22, 2014, 11:05:49 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24035
- Property Triage Stage Unreviewed → Accepted
-
Ticket #24035 – Description
initial v1 1 The interaction between CACHES[alias]['KEY_PREFIX'], CACHE_MIDDLEWARE_KEY_PREFIX and @cache_page(... key_prefix) is poorly documented. It should be made explicit that KEY_PREFIX is always used and combined with CACHE_MIDDLEWARE_KEY_PREFIX or @cache_page(... key_prefix)1 The interaction between `CACHES[alias]['KEY_PREFIX']`, `CACHE_MIDDLEWARE_KEY_PREFIX` and `@cache_page(... key_prefix)` is poorly documented. It should be made explicit that `KEY_PREFIX` is always used and combined with `CACHE_MIDDLEWARE_KEY_PREFIX` or `@cache_page(... key_prefix)` 2 2 3 3 Changes should be made to both ref/settings and topics/cache. … … 7 7 "The two settings can also be combined. If you specify a cache and a key_prefix, you will get all the settings of the requested cache alias, but with the key_prefix overridden. 8 8 9 Having looked through the source it appears as though the setting CACHE_MIDDLEWARE_KEY_PREFIX OR the argument to @cache_page is combined with the rest of the cache key using django.utils.cache.get_cache_key which is then combined with the CACHES[alias]['KEY_PREFIX'] using key_func.9 Having looked through the source it appears as though the setting `CACHE_MIDDLEWARE_KEY_PREFIX` OR the argument to `@cache_page` is combined with the rest of the cache key using `django.utils.cache.get_cache_key` which is then combined with the `CACHES[alias]['KEY_PREFIX']` using `key_func`.