MySpace Developer Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in
Blogs from the OpenSocial JS Container Team

Application Rendering Cache Changes (Coming Soon!)

Soon we are enabling both server-side and client-side caching of the app surface content.  This helps performance and creates a better user experience with those who have multiple apps installed on their profiles. Here is a quick break-down of how each type of user will be affected:

 

MySpace Admins & Developers will be able to:

  • ·         View their own private apps (in development, suspended, or hidden)

NOTE:  Caching will not be used for these users.

 

All Other Users (Including Friends of Apps) will:

  • ·         Be unable to view private apps (in development, suspended, or hidden)
  • ·         No longer be able to view a private app, even if you are a friend of the app.

NOTE: Caching will be enabled for these users.

 

Cache time will be for one hour initially but is configurable by the team here at MySpace and all users will be able to invalidate the cache with an explicit refresh.

NOTE: The only group really affected by this change, is developers who use friends of an app to test the app, while the app is private or in development. We do have support for multiple developers coming very soon, which is intended to replace the need to use friends of an app to test while an app is private. In the meantime, private apps will only be viewable by the developer or someone with administrative rights over the application. All other users will be treated as standard users.

Comments

 

★Daniel™ said:

What about apps that are live and need to be updated in real-time? Will there be a way to turn the cache off somehow? My app won't really function well if it's cached, as the info displayed on a user's profile is live data.

April 26, 2008 2:29 AM
 

Brandon Black said:

I would recommend using client-side script to dynamically return the live data you need.

As far as I know, all apps will get cached and at the moment there aren't any plans to allow a given app to specify whether it is to be cached or not.

April 26, 2008 1:06 PM
 

MarketWall.com said:

Yes! Thank you, thank you, thank you :)

<br/><br/>

Can you confirm whether or not MySpace is also doing makeRequest() caching as described here:

<br/>

<a href="developer.myspace.com/.../a>

April 26, 2008 1:07 PM
 

MarketWall.com said:

Oops, I guess this is one of the few places on MySpace where you aren't supposed to use html :)  The URL in my last post for the makeRequest() caching is:

developer.myspace.com/.../6413.aspx

April 26, 2008 1:49 PM
 

★Daniel™ said:

"I would recommend using client-side script to dynamically return the live data you need."

That's what I'm doing at the moment. So that'll still work properly?

*What's* being cached, exactly? The actual app content (ie. the JavaScript, etc.)?

April 26, 2008 9:22 PM
 

★Daniel™ said:

Also, how come on this blog I can change what it says under "Name (required)", but it just reverts back to my MySpace display name anyways? :P

April 26, 2008 9:22 PM
 

Brandon Black said:

@ Daaaaaaniel (: ™:

Its the actual app surface and it's contents that are getting cached.

If your app contains client-script to retrieve data realtime, then for the most part that script should still execute the same in the user's browser even if it's a cached version of that script.

@ MarketWall.com:

I am not 100% sure what caching (if any) makeRequest is using. I don't really work in that part of the platform, but I would guess that this won't have any impact on that since we are really only caching the app. surface itself.

I will try to dig up an definitive answer for you.

April 27, 2008 1:16 AM
 

Russ Cobbe said:

What about images are they cached?  Our treasure Hunt app dynamically generates an image for every profile view a user makes that has our app installed.  Its essential to its operation (ie: a treasure location with or without a piece of treasure is shown).  Caching that would really break things for our app.

April 27, 2008 10:51 AM
 

Jeremy said:

From what I understand of how browsers cache and the change implemented: if your image(s) is/are created with a script, they won't cache. If your content is created with a script, it won't cache.

All that's changing is the page on which the HTML, javascript, etc. is now being cached. So anything static will be cached.

There is no change to the way DataRequest and MakeRequest cache/don't cache information.

April 27, 2008 6:37 PM
 

Brandon Black said:

Jeremy is spot on.

If you are dynamically adding the content to the page with the script on your app surface then nothing should be different. Static content however, will be cached.

Really this change is geared more towards reducing the page load time for end users and improving performance on the MySpace servers themselves as they render the app surface. All apps should behave as they always have except a little bit more efficiently since static content will be cached.

The real reason for this blog was to make everyone aware of the fact that friends of apps will no longer be able to view apps that are private since we know some developers use that relationship for testing purposes. As the post mentions though, multiple developer support is close and that should replace the need to use friends of apps in the future.

April 27, 2008 7:04 PM