Show More
@@ -65,8 +65,8 b' class PostManager(models.Manager):' | |||
|
65 | 65 | thread.last_edit_time = timezone.now() |
|
66 | 66 | thread.save() |
|
67 | 67 | |
|
68 | cache_key = thread.get_cache_key() | |
|
69 | cache.delete(cache_key) | |
|
68 | #cache_key = thread.get_cache_key() | |
|
69 | #cache.delete(cache_key) | |
|
70 | 70 | |
|
71 | 71 | else: |
|
72 | 72 | self._delete_old_threads() |
@@ -85,8 +85,8 b' class PostManager(models.Manager):' | |||
|
85 | 85 | thread.last_edit_time = timezone.now() |
|
86 | 86 | thread.save() |
|
87 | 87 | |
|
88 | cache_key = thread.get_cache_key() | |
|
89 | cache.delete(cache_key) | |
|
88 | #cache_key = thread.get_cache_key() | |
|
89 | #cache.delete(cache_key) | |
|
90 | 90 | |
|
91 | 91 | post.delete() |
|
92 | 92 | |
@@ -123,16 +123,16 b' class PostManager(models.Manager):' | |||
|
123 | 123 | except Post.DoesNotExist: |
|
124 | 124 | raise Http404 |
|
125 | 125 | |
|
126 | cache_key = opening_post.get_cache_key() | |
|
127 | thread = cache.get(cache_key) | |
|
128 | if thread: | |
|
129 | return thread | |
|
126 | #cache_key = opening_post.get_cache_key() | |
|
127 | #thread = cache.get(cache_key) | |
|
128 | #if thread: | |
|
129 | # return thread | |
|
130 | 130 | |
|
131 | 131 | if opening_post.replies: |
|
132 | 132 | thread = [opening_post] |
|
133 | 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 | 137 | return thread |
|
138 | 138 |
General Comments 0
You need to be logged in to leave comments.
Login now