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.com<google-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.

Reply via email to