Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

passing TTL of cache properly now.

  • Loading branch information...
commit d77588d9e6826058157e859084fa3a48bcbac412 1 parent 61c6eb6
@justinabrahms justinabrahms authored
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}
Please sign in to comment.
Something went wrong with that request. Please try again.