/[projects]/android/MarketStats/src/dk/thoerup/marketstats/ShowStats.java
ViewVC logotype

Diff of /android/MarketStats/src/dk/thoerup/marketstats/ShowStats.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 757 by torben, Thu May 27 08:51:59 2010 UTC revision 760 by torben, Thu May 27 09:45:44 2010 UTC
# Line 4  import java.io.IOException; Line 4  import java.io.IOException;
4  import java.io.PrintWriter;  import java.io.PrintWriter;
5  import java.net.InetSocketAddress;  import java.net.InetSocketAddress;
6  import java.util.ArrayList;  import java.util.ArrayList;
 import java.util.Collections;  
7  import java.util.Date;  import java.util.Date;
8  import java.util.Locale;  import java.util.Locale;
9  import java.util.logging.Logger;  import java.util.logging.Logger;
# Line 51  public class ShowStats extends HttpServl Line 50  public class ShowStats extends HttpServl
50          protected String doLookup(String query) throws IOException {          protected String doLookup(String query) throws IOException {
51                                    
52    
53                  String key = "marketstats:" + query;                  String key = "marketstats:" + query.replace(' ', '_');
54                  String response = (String) memcache.get(key);                  String response = (String) memcache.get(key);
55    
56                  if (response == null) {                  if (response == null) {
# Line 149  public class ShowStats extends HttpServl Line 148  public class ShowStats extends HttpServl
148    
149                  response.setContentType("text/html");                  response.setContentType("text/html");
150                  PrintWriter out = response.getWriter();                  PrintWriter out = response.getWriter();
151                  out.print( "<html><body><pre>" + doLookupWorker(query) + "</pre></body></html>" );                  out.print( "<html><body><pre>" + doLookup(query) + "</pre></body></html>" );
152          }          }
153    
154  }  }

Legend:
Removed from v.757  
changed lines
  Added in v.760

  ViewVC Help
Powered by ViewVC 1.1.20