Hi Alex,

  You're right about the callback / response typo - looks like that
was confused when the function was copied to the documentation.

  I don't understand your skepticism though - the point of the refresh
interval is to change the URL being fetched every N seconds, so that a
new version is cached for subsequent requests.  Following is a table
showing the output of the function over time (assuming refresh
interval == 5):

var ts = 1259711045000;

X     Math.floor(ts + X / 5000)
-------------------------------
0     251942209
1000  251942209
2000  251942209
3000  251942209
4000  251942210
5000  251942210
6000  251942210
7000  251942210
8000  251942210
9000  251942211
10000 251942211
11000 251942211
12000 251942211
13000 251942211
14000 251942212
15000 251942212
16000 251942212
17000 251942212
18000 251942212
19000 251942213


~Arne

On Nov 29, 9:11 pm, Alexandre Jasmin <[email protected]> wrote:
> In the code sample given 
> at:http://code.google.com/apis/gadgets/docs/remote-content.html#Cache
>
> The parameter passed to gadgets.io.makeRequest() should be 'callback'
> not 'response'
>   function makeCachedRequest(url, __callback__, params,
> refreshInterval) {
>    ...
>   gadgets.io.makeRequest(url, __response__, params);
>
> I'm also a bit skeptical about this line
> ts = Math.floor(ts / (refreshInterval * 1000));
>
> Why is the current time stamp divided by the refreshInterval here?

--

You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" 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-Gadgets-API?hl=en.


Reply via email to