Skip to content

Commit

Permalink
Don't cache server_list and server_status views
Browse files Browse the repository at this point in the history
Fixes ericflo#2
  • Loading branch information
Eric Davis committed Nov 21, 2011
1 parent c5334ba commit 4f99dea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions django_memcached/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.conf import settings
from django.template import RequestContext
from django.core.exceptions import ImproperlyConfigured
from django.views.decorators.cache import never_cache

from django_memcached.util import get_memcached_stats
from django.contrib.auth.decorators import user_passes_test
Expand Down Expand Up @@ -38,6 +39,7 @@ def get_cache_server_list():

return hosts if isinstance(hosts, list) else hosts.split(';')

@never_cache
def server_list(request):
servers = get_cache_server_list()
statuses = []
Expand All @@ -53,6 +55,7 @@ def server_list(request):
context_instance=RequestContext(request)
)

@never_cache
def server_status(request, index):
servers = get_cache_server_list()
try:
Expand Down

0 comments on commit 4f99dea

Please sign in to comment.