1. Tom Clancy
  2. tkc_apps

Commits

Tom Clancy  committed 3b9c1fb

cache key error

  • Participants
  • Parent commits b188994
  • Branches default

Comments (0)

Files changed (1)

File pages/views.py

View file
 	# look for cached copy of page
 	if settings.USE_CACHE:
 		cache_key = HtmlPage.get_cache_key_for_page(slug)
-		page_view = cache.get(cache_key, None)
-		if page_view:
-			return page_view
+		try:
+			page_view = cache.get(cache_key, None)
+			if page_view:
+				return page_view
+		except:
+			# basically for MemcachedKeyCharacterError, but I don't want to
+			# tie this to an implementation
+			pass
 
 	page = get_object_or_404(HtmlPage, slug=slug, active=True)