Skip to content
Browse files

passing TTL of cache properly now.

  • Loading branch information...
1 parent 61c6eb6 commit d77588d9e6826058157e859084fa3a48bcbac412 @justinabrahms justinabrahms committed
Showing with 5 additions and 1 deletion.
  1. +5 −1 django_website/context_processors.py
View
6 django_website/context_processors.py
@@ -7,5 +7,9 @@ def recent_release(request):
recent_release = cache.get('recent_release')
if not recent_release:
recent_release = DocumentRelease.objects.default().version
- cache.set('recent_release', recent_release)
+ cache.set(
+ '%s_recent_release' % settings.CACHE_MIDDLEWARE_KEY_PREFIX,
+ recent_release,
+ settings.CACHE_MIDDLEWARE_SECONDS,
+ )
return {'RECENT_RELEASE': recent_release}

0 comments on commit d77588d

Please sign in to comment.
Something went wrong with that request. Please try again.