Disabling cache in the Orkut sandbox

11 views
Skip to first unread message
Message has been deleted

Arne Roomann-Kurrik (Google)

unread,
Nov 3, 2007, 1:32:12 PM11/3/07
to OpenSocial Developers
Orkut's sandbox caches your gadget to improve latency. This is
undesirable during development, so to bypass caching on a given Orkut
page, please append &bpc=1 to the URL of the page itself:

For example:

Cached:
http://sandbox.orkut.com/Application.aspx?uid=x&appId=x

Not cached:
http://sandbox.orkut.com/Application.aspx?uid=x&appId=x&bpc=1


Please note that you do not append bpc=1 to the url of the gadget you
install.

~Arne

Suhail Doshi

unread,
Nov 3, 2007, 1:42:11 PM11/3/07
to OpenSocial Developers
Thank you, that was very much needed. So tedious any other way :P

On Nov 3, 10:32 am, "Arne Roomann-Kurrik (Google)"

Sahil

unread,
Nov 3, 2007, 3:32:49 PM11/3/07
to OpenSocial Developers
A LifeSaver....

On Nov 3, 10:32 pm, "Arne Roomann-Kurrik (Google)"

mbchandar

unread,
Nov 3, 2007, 9:53:48 PM11/3/07
to OpenSocial Developers
thank you arne.

if sandbox for development
then disable cache = true
why the orkut sandbox does not have that by default?

- bala
http://beyondwork.wordpress.com

On Nov 3, 10:32 pm, "Arne Roomann-Kurrik (Google)"
<api.kur...@google.com> wrote:

Brian Rue

unread,
Nov 4, 2007, 1:00:29 AM11/4/07
to OpenSocial Developers
Awesome, thanks!

On Nov 3, 10:32 am, "Arne Roomann-Kurrik (Google)"

EGreg

unread,
Nov 4, 2007, 2:27:06 AM11/4/07
to OpenSocial Developers
That helps a lot, Thanks Arne!

Greg Magarshak

On Nov 3, 12:32 pm, "Arne Roomann-Kurrik (Google)"

Sahil

unread,
Nov 4, 2007, 4:40:16 AM11/4/07
to OpenSocial Developers
I have created a Greasemonkey script for firefox, which will append
&bpc=1 automatically to the application pages.

http://www.tricks4fun.com/orkut-sandbox-permanent-no-cache/

On Nov 3, 10:32 pm, "Arne Roomann-Kurrik (Google)"

EGreg

unread,
Nov 4, 2007, 11:09:04 AM11/4/07
to OpenSocial Developers
Arne - it's cool to be able to not cache the gadget, but this brings
up a problem which I mentioned in another thread ("Unofficial bugs").
If gadgets are cached AND the underlying API implementation changes
(which, if experience with facebook taught us anything, is very
possible), it will be a big problem. If the container changes its
implementation, all the cached apps would break. At which point can
app developers "fix" and "adapt" their applications then? Perhaps, if
you really will cache javascript, there should be some revision number
for the container's implementation. When it changes, the app
developers have a chance to upload a script with the new revision
number, so that (potentially) millions of users aren't stuck having to
re-add the application.

Greg

Arne Roomann-Kurrik (Google)

unread,
Nov 5, 2007, 11:57:51 AM11/5/07
to OpenSocial Developers
Hi Greg,

These are valid concerns, and we're aware that gadget developers
don't want to get stuck between API versions and caching. For the
first issue, the cache lifespan is only an hour, so users with older
versions of the gadget will only be out of sync for a relatively short
period of time. Secondly, you'll notice that the <Require
feature="opensocial-0.5" /> contains a version number. The plan is to
release a higher version API while still supporting a lower version
number for a short period of time, so that developers are able to port
their apps while minimizing downtime due to breaking changes in the
API. We won't be able to guarantee this for all changes (if the
underlying infrastructure changes, for example) but we'll certainly be
working hard to minimize the amount of pain that such changes will
bring.

~Arne

ronman

unread,
Nov 6, 2007, 9:22:16 PM11/6/07
to OpenSocial Developers
This is a very helpful script, and bpc=1 is indeed added to the end of
the URL, but it still caches.
Not only the gadget source, but it also caches what is returned from a
remote server as a result of an
_IG_FetchContent call.

Why can't caching just be turned off in the sandbox for everyone by
default?

Even so, caching the remote data may be an additional problem...

The server I'm being routed to is: un64mq1e-a.modules.com

Ron

Daniel C. Silverstein (cubes)

unread,
Nov 10, 2007, 9:07:46 AM11/10/07
to opensoc...@googlegroups.com
Arne,

Why not flush the cache whenever there's a new api release is pushed
out?

(Dan)

Alper Çuğun

unread,
Nov 13, 2007, 8:48:41 AM11/13/07
to OpenSocial - OpenSocial API Definition (was OpenSocial Developers)
On Nov 7, 3:22 am, ronman <ron.new...@gmail.com> wrote:
> This is a very helpful script, and bpc=1 is indeed added to the end of
> the URL, but it still caches.

Yeah, for me also it doesn't pick up any changes in the XML file. Is
there another OpenSocial sandbox we can use te develop on?

--
Alper

Arne Roomann-Kurrik (Google)

unread,
Nov 13, 2007, 12:46:05 PM11/13/07
to OpenSocial - OpenSocial API Definition (was OpenSocial Developers)
Hi ronman,

Are you using the refreshInterval parameter for your IG_Fetch
calls?

>From http://code.google.com/apis/gadgets/docs/remote-content.html#Params
:
// Disable caching completely and fetch fresh content every time
-- !! Try to avoid using this !!
_IG_FetchContent("http://news.google.com/?output=rss", callback,
{ refreshInterval: 0 });

This should be fine for development purposes.

I'm seeing a lot of cases where people are using &bpc=1 but their
browser continues to cache the old code. If you're still seeing old
data, can you try disabling your browser cache and seeing if the
problem goes away?

~Arne

Arne Roomann-Kurrik (Google)

unread,
Nov 13, 2007, 12:46:17 PM11/13/07
to OpenSocial - OpenSocial API Definition (was OpenSocial Developers)
Hey Dan,

That would make sense. I'll bring it up with the team doing the
pushes.

~Arne

On Nov 10, 6:07 am, "Daniel C. Silverstein (cubes)" <cu...@slide.com>
wrote:

Arne Roomann-Kurrik (Google)

unread,
Nov 21, 2007, 4:56:10 PM11/21/07
to OpenSocial - OpenSocial API Definition
I'm moving this thread to the Orkut Discssion subgroup. Please
continue any further discussion there.

Thanks,
~Arne
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages