From d1cdc30fb66c800a236c6bc7bad067d0d46edbbd Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Wed, 27 Nov 2013 13:43:13 +0700 Subject: getTags caching --- src/java/com/juick/http/www/Discover.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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(""); out.println(""); // wrapper + if (tagsHTML == null) { + tagsHTML = getTags(sql, 60); + } out.println("
"); out.println(" "); out.println("
"); - out.println("

" + getTags(sql, 60) + "

"); + out.println("

" + tagsHTML + "

"); out.println("
"); out.println(""); // topwrapper -- cgit v1.2.3