mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Made the cache locale-dependant when USE_L10N is True, even if USE_I18N is False. Refs #5691.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -158,7 +158,7 @@ def has_vary_header(response, header_query):
|
||||
|
||||
def _i18n_cache_key_suffix(request, cache_key):
|
||||
"""If enabled, returns the cache key ending with a locale."""
|
||||
if settings.USE_I18N:
|
||||
if settings.USE_I18N or settings.USE_L10N:
|
||||
# first check if LocaleMiddleware or another middleware added
|
||||
# LANGUAGE_CODE to request, then fall back to the active language
|
||||
# which in turn can also fall back to settings.LANGUAGE_CODE
|
||||
|
||||
Reference in New Issue
Block a user