Mercurial > public > sg101
changeset 954:e56455f4626b
Merge with upstream.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Tue, 26 May 2015 20:40:31 -0500 |
parents | 0a2f23d5bec4 (current diff) 8647a669edb4 (diff) |
children | 71a671dab55d |
files | |
diffstat | 1 files changed, 2 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/forums/templatetags/forum_tags.py Tue May 19 19:31:45 2015 -0500 +++ b/forums/templatetags/forum_tags.py Tue May 26 20:40:31 2015 -0500 @@ -61,18 +61,9 @@ """ Return the supplied user's time preferences in the form of a 2-tuple: (use_24_time, time_zone_name) - - These preferences are cached to reduce database hits. - """ - cache_key = '%s_tz_prefs' % user.username - tz_prefs = cache.get(cache_key) - if tz_prefs is None: - profile = user.profile - tz_prefs = profile.use_24_time, profile.time_zone - cache.set(cache_key, tz_prefs) - - return tz_prefs + profile = user.profile + return profile.use_24_time, profile.time_zone @register.simple_tag