diff --git a/boards/models.py b/boards/models.py --- a/boards/models.py +++ b/boards/models.py @@ -65,8 +65,8 @@ class PostManager(models.Manager): thread.last_edit_time = timezone.now() thread.save() - cache_key = thread.get_cache_key() - cache.delete(cache_key) + #cache_key = thread.get_cache_key() + #cache.delete(cache_key) else: self._delete_old_threads() @@ -85,8 +85,8 @@ class PostManager(models.Manager): thread.last_edit_time = timezone.now() thread.save() - cache_key = thread.get_cache_key() - cache.delete(cache_key) + #cache_key = thread.get_cache_key() + #cache.delete(cache_key) post.delete() @@ -123,16 +123,16 @@ class PostManager(models.Manager): except Post.DoesNotExist: raise Http404 - cache_key = opening_post.get_cache_key() - thread = cache.get(cache_key) - if thread: - return thread + #cache_key = opening_post.get_cache_key() + #thread = cache.get(cache_key) + #if thread: + # return thread if opening_post.replies: thread = [opening_post] thread.extend(opening_post.replies.all().order_by('pub_time')) - cache.set(cache_key, thread, board_settings.CACHE_TIMEOUT) + #cache.set(cache_key, thread, board_settings.CACHE_TIMEOUT) return thread