That should work just fine. If you set the cache control headers for 1 day,
the HttpRequest Fetch response will be cached for that amount of time.

Cheers,
Shishir

On Tue, Jul 7, 2009 at 12:09 AM, DarkCoiote <darkcoi...@gmail.com> wrote:

>
> Hum...
>
> but the httprequest fetchs from a dynamic source, although I memcache
> de dynamic
> calculations....
>
> I guess I can just set the http response headers cache field properly
> then...
>
> I'm using appengine as the server-side.... just read "Script handlers
> can set cache durations by returning the appropriate HTTP headers to
> the browser"...
>
> and found: this example [1]
>
>        self.response.headers.update({
>            'Cache-Control': 'max-age=86400',
>            'Expires': (lastmod + timedelta(days=1)).strftime(fmt),
>            'Last-Modified': lastmod.strftime(fmt),
>            'Content-Type': 'image/png'
>        })
>
> What parameters should I use to use better the orkut cache system?
>
> Thanks!
>
> [1]
> http://appengine-cookbook.appspot.com/recipe/display-avatar-with-caching-to-reduce-the-datastore-api-calls/
>
>
> On Jul 6, 12:09 am, Apurv Gupta <apurv.gu...@gmail.com> wrote:
> > your responses are cached on our servers provided you serve the right
> http
> > caching headers.
> >
> > On Sun, Jul 5, 2009 at 7:58 PM, DarkCoiote <darkcoi...@gmail.com> wrote:
> >
> > > Is it possible to do some sort of caching of HttpRequests with the
> > > opensocial app data?
> >
> > > The flow would be something like:
> >
> > > """
> > > fetch from appdata (fast/low-latency)
> >
> > > if it is recent enough (1 day)
> > >   display nice stuff with data
> > > else
> > >   do expensive/high-latency HttpRequest
> > >   put data in cache
> > >   display nice stuff with data
> > > """
> >
> > > That way not only I would reduce the profile view latency but also
> > > reduce my server bandwidth
> >
> > > If it is possible, my guess would be to use conditional scripts of
> > > type="text/os-data"....
> >
> > > Thanks.
> >
>


-- 

Clifford Stoll<http://www.brainyquote.com/quotes/authors/c/clifford_stoll.html>
- "The Internet is a telephone system that's gotten uppity."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
To unsubscribe from this group, send email to 
opensocial-orkut+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to