Re: [appengine-java] Re: Caching pages.
You may consider using OSCache (http://www.opensymphony.com/oscache/) for caching parts of JSPs with its JSP tags or whole responses (don't know if it works with GAE). Cheers, Stephan 2010/2/13 abhi abhishek9...@gmail.com @ bimbo jones - Thanx , thats a good idea, i guess i found out how to use memcache for jsps , jsp has a buffer , so i can save it to memcache :) @Brain - The server should cache JSP's for you- what do you mean by that? Do you mean browser cache? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Caching pages.
Hey there, I cached some html pages with tags like #MESSAGE# in a string, then used, htmlstring = htmlstring.replaceall(#MESSAGE#,new message); then just print the whole string. BufferedReader in = new BufferedReader(new FileReader(pagetobecached.html)); while (in.ready()) htmlstring= htmlstring+in.readLine(); Then you can cache/change it and print to the HttpServletResponse with a PrintWriter, then when you need it later you just have to use (String) cache.get(key); and voilá. Hope this helps. 2010/2/11 Brian bwa...@gmail.com The server should cache JSP's for you, you would only cache any stuff that is needed by the page and sent to it from your action On Feb 11, 9:33 am, abhi abhishek9...@gmail.com wrote: Caching objects in App engine is easy Cache cache; Cache cache ; try { cache = CacheManager.getInstance().getCacheFactory().createCache(Collections.emptyM ap()); } catch (CacheException e) { // ... } String key; // ... int value;// ... // Put the value into the cache. cache.put(key, value); I am using jsp pages, how do i cache whole pages? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Re: Caching pages.
I'm actually pretty sure that's worse than just serving the static file from the filesystem. Prove me wrong with benchmarks ... On Thu, Feb 11, 2010 at 5:24 PM, Brian bwa...@gmail.com wrote: Not sure that would really save any time unless your page is super complex to render and the app engine app server is super dumb, but I guess it is possible with app engine. On Feb 11, 5:40 pm, bimbo jones bimbojone...@gmail.com wrote: Hey there, I cached some html pages with tags like #MESSAGE# in a string, then used, htmlstring = htmlstring.replaceall(#MESSAGE#,new message); then just print the whole string. BufferedReader in = new BufferedReader(new FileReader(pagetobecached.html)); while (in.ready()) htmlstring= htmlstring+in.readLine(); Then you can cache/change it and print to the HttpServletResponse with a PrintWriter, then when you need it later you just have to use (String) cache.get(key); and voilá. Hope this helps. 2010/2/11 Brian bwa...@gmail.com The server should cache JSP's for you, you would only cache any stuff that is needed by the page and sent to it from your action On Feb 11, 9:33 am, abhi abhishek9...@gmail.com wrote: Caching objects in App engine is easy Cache cache; Cache cache ; try { cache = CacheManager.getInstance().getCacheFactory().createCache(Collections.emptyM ap()); } catch (CacheException e) { // ... } String key; // ... int value;// ... // Put the value into the cache. cache.put(key, value); I am using jsp pages, how do i cache whole pages? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.comgoogle-appengine-java%2B unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Ikai Lan Developer Programs Engineer, Google App Engine http://googleappengine.blogspot.com | http://twitter.com/app_engine -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.