##// END OF EJS Templates
Commented out the thread caching cause it causes bugs with images
neko259 -
r328:a13c864b default
parent child Browse files
Show More
@@ -65,8 +65,8 b' class PostManager(models.Manager):'
65 thread.last_edit_time = timezone.now()
65 thread.last_edit_time = timezone.now()
66 thread.save()
66 thread.save()
67
67
68 cache_key = thread.get_cache_key()
68 #cache_key = thread.get_cache_key()
69 cache.delete(cache_key)
69 #cache.delete(cache_key)
70
70
71 else:
71 else:
72 self._delete_old_threads()
72 self._delete_old_threads()
@@ -85,8 +85,8 b' class PostManager(models.Manager):'
85 thread.last_edit_time = timezone.now()
85 thread.last_edit_time = timezone.now()
86 thread.save()
86 thread.save()
87
87
88 cache_key = thread.get_cache_key()
88 #cache_key = thread.get_cache_key()
89 cache.delete(cache_key)
89 #cache.delete(cache_key)
90
90
91 post.delete()
91 post.delete()
92
92
@@ -123,16 +123,16 b' class PostManager(models.Manager):'
123 except Post.DoesNotExist:
123 except Post.DoesNotExist:
124 raise Http404
124 raise Http404
125
125
126 cache_key = opening_post.get_cache_key()
126 #cache_key = opening_post.get_cache_key()
127 thread = cache.get(cache_key)
127 #thread = cache.get(cache_key)
128 if thread:
128 #if thread:
129 return thread
129 # return thread
130
130
131 if opening_post.replies:
131 if opening_post.replies:
132 thread = [opening_post]
132 thread = [opening_post]
133 thread.extend(opening_post.replies.all().order_by('pub_time'))
133 thread.extend(opening_post.replies.all().order_by('pub_time'))
134
134
135 cache.set(cache_key, thread, board_settings.CACHE_TIMEOUT)
135 #cache.set(cache_key, thread, board_settings.CACHE_TIMEOUT)
136
136
137 return thread
137 return thread
138
138
General Comments 0
You need to be logged in to leave comments. Login now