aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-11-27 13:43:13 +0700
committerGravatar Ugnich Anton2013-11-27 13:43:13 +0700
commitd1cdc30fb66c800a236c6bc7bad067d0d46edbbd (patch)
tree7b0e6c6b3036ecf3c312fc744f40a601e024c8c3 /src/java/com/juick/http/www
parent19425425c418c080fd8db265907a8579c2e13a7c (diff)
getTags caching
Diffstat (limited to 'src/java/com/juick/http/www')
-rw-r--r--src/java/com/juick/http/www/Discover.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/java/com/juick/http/www/Discover.java b/src/java/com/juick/http/www/Discover.java
index 62822ee4..dd871df4 100644
--- a/src/java/com/juick/http/www/Discover.java
+++ b/src/java/com/juick/http/www/Discover.java
@@ -43,6 +43,8 @@ import javax.servlet.http.HttpServletResponse;
*/
public class Discover {
+ private String tagsHTML = null;
+
protected void doGet(Connection sql, Connection sqlSearch, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
com.juick.User visitor = Utils.getVisitorUser(sql, request);
Locale locale = request.getLocale();
@@ -145,6 +147,9 @@ public class Discover {
out.println("</div>");
out.println("</div>"); // wrapper
+ if (tagsHTML == null) {
+ tagsHTML = getTags(sql, 60);
+ }
out.println("<div id=\"column\" class=\"abs\">");
out.println(" <ul>");
@@ -152,7 +157,7 @@ public class Discover {
out.println(" <li><a href=\"/discover?show=photos\">" + rb.getString("With photos") + "</a></li>");
out.println(" </ul>");
out.println(" <hr/>");
- out.println(" <p>" + getTags(sql, 60) + "</p>");
+ out.println(" <p>" + tagsHTML + "</p>");
out.println("</div>");
out.println("</div>"); // topwrapper