refreshInterval changes for 0.8

6 views
Skip to first unread message

Paul Lindner

unread,
Apr 14, 2008, 2:55:56 PM4/14/08
to opensocial-an...@googlegroups.com
To successfully use a caching layer we need to give developers a way
to specify the TTLs of the content they want to fetch. Here's my
proposed changes

Change

gadgets.io.getProxyUrl(url)

to

gadgets.io.getProxyUrl(url, opts)

Add a new option REFRESH_INTERVAL to control the TTL for proxied
content. Recommend that the default be 1h (3600 seconds)


Add

<static> object REFRESH_INTERVAL

Attempt to use content caching. The Refresh Interval is the number
of seconds we want to cache the given response. The default is 3600
(1 hour). Note that Signed requests and object with POST_DATA
present will generally not be cached.

to gadgets.io.RequestParameters

--
Paul Lindner ||||| | | | | | | | | |
lin...@inuus.com

Kevin Brown

unread,
Apr 14, 2008, 3:19:16 PM4/14/08
to opensocial-an...@googlegroups.com
It's important that we distinguish between the opts allowed for getProxyUrl and the opts allowed for makeRequest -- getProxyUrl isn't going to work if you want SIGNED data, for instance (OAuth signing could potentially be done in JS, but that's unlikely). This can probably be handled by documentation for now (I never did care for trying to simulate enumerations in JS anyway).
--
~Kevin

Paul Lindner

unread,
Apr 15, 2008, 4:11:11 PM4/15/08
to opensocial-an...@googlegroups.com
On Mon, Apr 14, 2008 at 12:19:16PM -0700, Kevin Brown wrote:
> It's important that we distinguish between the opts allowed for getProxyUrl
> and the opts allowed for makeRequest -- getProxyUrl isn't going to work if
> you want SIGNED data, for instance (OAuth signing could potentially be done
> in JS, but that's unlikely). This can probably be handled by documentation
> for now (I never did care for trying to simulate enumerations in JS anyway).

Agreed, the two methods use different options, I just want to stick
with common param names where appropriate.

I'd really like to see this for 0.8. We've had a number of developer
requests for this and I've added it to hi5modules.com as an interim
measure. Our latest changeset adds this to getProxyUrl:

http://www.hi5networks.com/platform/changeset/122

And previously we added REFRESH_INTERVAL to makeRequest etc.

Reinoud Elhorst

unread,
Apr 15, 2008, 5:05:20 PM4/15/08
to opensocial-an...@googlegroups.com
In my understanding the HTTP response headers determine the cache time at the moment, right? How do they relate to this proposal?

Cassie

unread,
Apr 21, 2008, 5:55:44 AM4/21/08
to opensocial-an...@googlegroups.com
My only contribution here is that in gadgets.io.getProxyUrl(url, opts) opts should be "opt_params". Just to try and stick to some of the naming conventions we have come up with.

Added to the spreadsheet.

- Cassie

Brian Eaton

unread,
Apr 25, 2008, 1:47:50 PM4/25/08
to opensocial-an...@googlegroups.com
+1.

Arne Roomann-Kurrik

unread,
Apr 25, 2008, 2:22:49 PM4/25/08
to opensocial-an...@googlegroups.com
+1 but I'm also interested in including the answer to Reinoud's question somewhere in the spec.
--
OpenSocial IRC - irc://irc.freenode.net/opensocial

mnew...@myspace.com

unread,
Apr 25, 2008, 6:44:33 PM4/25/08
to OpenSocial and Gadgets Specification Discussion
+1

On Apr 25, 11:22 am, "Arne Roomann-Kurrik" <kur...@google.com> wrote:
> +1 but I'm also interested in including the answer to Reinoud's question
> somewhere in the spec.
>
>
>
> On Fri, Apr 25, 2008 at 10:47 AM, Brian Eaton <bea...@google.com> wrote:
>
> > +1.
>
> > On Mon, Apr 21, 2008 at 2:55 AM, Cassie <d...@google.com> wrote:
> > > My only contribution here is that in gadgets.io.getProxyUrl(url, opts)
> > opts
> > > should be "opt_params". Just to try and stick to some of the naming
> > > conventions we have come up with.
>
> > > Added to the spreadsheet.
>
> > > - Cassie
>
> > > On Tue, Apr 15, 2008 at 11:05 PM, Reinoud Elhorst <rein...@hyves.nl>
> > wrote:
> > > > In my understanding the HTTP response headers determine the cache time
> > at
> > > the moment, right? How do they relate to this proposal?
>
> > > > On Tue, Apr 15, 2008 at 10:11 PM, Paul Lindner <lind...@inuus.com>
> > > > > lind...@inuus.com

Paul Lindner

unread,
Apr 25, 2008, 7:24:42 PM4/25/08
to opensocial-an...@googlegroups.com
On Tue, Apr 15, 2008 at 11:05:20PM +0200, Reinoud Elhorst wrote:
> In my understanding the HTTP response headers determine the cache time at
> the moment, right? How do they relate to this proposal?

Some proxies may not be able to pass through the http headers, plus
some http servers are not easy to set up cache-control headers. This
gives the application writer an easy way to _override_ the default
caching interval for an object, and also convey that a request may be
transient.

> You received this message because you are subscribed to the Google Groups "OpenSocial and Gadgets Specification Discussion" group.
> To post to this group, send email to opensocial-an...@googlegroups.com
> To unsubscribe from this group, send email to opensocial-and-gadg...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/opensocial-and-gadgets-spec?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

--
Paul Lindner ||||| | | | | | | | | |
lin...@inuus.com

Paul Lindner

unread,
Apr 25, 2008, 7:25:31 PM4/25/08
to opensocial-an...@googlegroups.com
Yes, +1, consistency is good.

Louis Ryan

unread,
Apr 25, 2008, 9:46:47 PM4/25/08
to opensocial-an...@googlegroups.com
+1 and +1 for adding this to the URL templates proposal

Cassie

unread,
Apr 27, 2008, 7:06:12 PM4/27/08
to opensocial-an...@googlegroups.com
spec change approved.
thanks.

- cassie
Reply all
Reply to author
Forward
0 new messages