Thanks Jason! You explained it very well :)

On Oct 23, 2:41 am, Jason <[EMAIL PROTECTED]> wrote:
> Responses returned from makeRequest invocations are cached by the
> proxy (assuming the requests use the GET method and not POST). The
> cache-control technique described in the article simply gives you a
> way to control this cache -- passing in 0 as the refreshInterval
> causes the current time to be appended to the URL in order to
> guarantee that the results are always up-to-date while passing in a
> higher number causes all requests issued within the passed interval to
> target the same resource so a cached response will be returned from
> the proxy after the first request.
>
> In your case, you shouldn't use makeCachedRequest at all -- just use
> makeRequest directly. If one instance of your application requests a
> particular resource, the proxy will automatically cache it for you.
> Any other requests for that resource from the same instance or other
> instances will receive the cached response. Unfortunately, there's no
> real way of guaranteeing that no more than 70 different user names
> will be requested per hour.
>
> This is a difficult issue to explain, but I hope I've helped. Let me
> know if you have any follow-ups for me.
>
> - Jason
>
>  completely client-side, so separate instances requesting the same
> feed will each hit Twitter's server.
>
> On Oct 19, 2:00 am, hwked <[EMAIL PROTECTED]> wrote:
>
> > Maybe I will need to create a cache of the response locally at each
> > user's computer. But how do I do that :|
> > The twitter api only allows 70 api calls per hour :|
>
> > hwked wrote:
> > > I am using the makeCachedRequest 
> > > (http://code.google.com/p/opensocial-resources/wiki/GadgetsMakeRequest
> > > )
>
> > > And I am setting the refreshinterval= 216000, so that the request is
> > > made every 1 hour.
>
> > > However my request depends upon the username supplied to the gadget,
> > > which would be different for each instance of the gadget. The request
> > > URI changes if the username is changed.
> > > the request URI is of the form:
>
> > > "http://twitter.com/statuses/user_timeline/"+username+".json";;
>
> > > What I want is that for each username, the response is cached. So
> > > that, the next time the supplied URI is of the same username, the
> > > cache is used. I don't think makeCachedRequest is doing that/ does
> > > that.
>
> > > Can you suggest me a way I can implement this?
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to