##// END OF EJS Templates
Optimized post caching a little
neko259 -
r581:63c411a6 default
parent child Browse files
Show More
@@ -4,14 +4,14 b''
4
4
5 {% get_current_language as LANGUAGE_CODE %}
5 {% get_current_language as LANGUAGE_CODE %}
6
6
7 {% with thread=post.thread_new %}
7 {% with thread=post.thread_new bumpable=thread.can_bump %}
8 {% cache 600 post post.id thread.last_edit_time truncated moderator LANGUAGE_CODE need_open_link %}
8 {% cache 600 post post.id post.last_edit_time thread.archived bumpable truncated moderator LANGUAGE_CODE need_open_link %}
9
9
10 {% with is_opening=post.is_opening %}
10 {% with is_opening=post.is_opening %}
11 {% spaceless %}
11 {% spaceless %}
12 {% if thread.archived %}
12 {% if thread.archived %}
13 <div class="post archive_post" id="{{ post.id }}">
13 <div class="post archive_post" id="{{ post.id }}">
14 {% elif thread.can_bump %}
14 {% elif bumpable %}
15 <div class="post" id="{{ post.id }}">
15 <div class="post" id="{{ post.id }}">
16 {% else %}
16 {% else %}
17 <div class="post dead_post" id="{{ post.id }}">
17 <div class="post dead_post" id="{{ post.id }}">
@@ -34,10 +34,8 b''
34 <div class="message">
34 <div class="message">
35 <div class="post-info">
35 <div class="post-info">
36 <span class="title">{{ post.title }}</span>
36 <span class="title">{{ post.title }}</span>
37 {% cache 600 post_id post.id %}
38 <a class="post_id" href="{% post_url post.id %}">
37 <a class="post_id" href="{% post_url post.id %}">
39 ({{ post.id }}) </a>
38 ({{ post.id }}) </a>
40 {% endcache %}
41 [<span class="pub_time">{{ post.pub_time }}</span>]
39 [<span class="pub_time">{{ post.pub_time }}</span>]
42 {% if thread.archived %}
40 {% if thread.archived %}
43 — [{{ thread.bump_time }}]
41 — [{{ thread.bump_time }}]
@@ -73,7 +71,6 b''
73 {{ post.text.rendered }}
71 {{ post.text.rendered }}
74 {% endif %}
72 {% endif %}
75 {% endautoescape %}
73 {% endautoescape %}
76 {% cache 600 post_replies post.id post.last_edit_time moderator LANGUAGE_CODE %}
77 {% if post.is_referenced %}
74 {% if post.is_referenced %}
78 <div class="refmap">
75 <div class="refmap">
79 {% trans "Replies" %}:
76 {% trans "Replies" %}:
@@ -83,7 +80,6 b''
83 {% endfor %}
80 {% endfor %}
84 </div>
81 </div>
85 {% endif %}
82 {% endif %}
86 {% endcache %}
87 </div>
83 </div>
88 {% if is_opening and thread.tags.exists %}
84 {% if is_opening and thread.tags.exists %}
89 <div class="metadata">
85 <div class="metadata">
General Comments 0
You need to be logged in to leave comments. Login now