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 <[email protected]> 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 <[email protected]> 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 <[email protected]>
> >
> >
> >
> > > 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 <[email protected]> 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
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-appengine-java%[email protected]><google-appengine-java%2B
> [email protected]>
> > > .
> > > 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
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to