Step 9: Tell Us About Your CacheThis is a featured page

If you are setting up a cache to handle the requests for cells, it is possible that your users will be looking at stale content. This may be a problem with user-generated content, where editors expect their changes to be visible immediately.

The client application will, if instructed, handle cached content. When a user loads a page with potentially stale content, the client will request the latest content from our server -- if the version served on your page is not the most recent, it will replace the cell content on the page with the new content.

To inform us about caching call the client application's WPCAPI.setCachedContentHandling() method and pass true as the parameter.

Example
WPCAPI.setCachedContentHandling(true);

Delayed Rendering

Because the content may be different between versions, we hide the original content on the page until we've verified the version. This prevents a "shifting" from occurring; it would be distracting to see the content change automatically. However, this does delay the rendering of the content until later in the pageload process. Only set the client-side parameter if you are indeed caching your requests to avoid doing this unnecessarily.

Next Step 10: Subscribe To The Data Feeds


boe_wetpaint
boe_wetpaint
Latest page update: made by boe_wetpaint , Sep 23 2008, 1:55 PM EDT (about this update About This Update boe_wetpaint Edited by boe_wetpaint


view changes

- complete history)
More Info: links to this page
There are no threads for this page.  Be the first to start a new thread.

Related Content

  (what's this?Related ContentThanks to keyword tags, links to related pages and threads are added to the bottom of your pages. Up to 15 links are shown, determined by matching tags and by how recently the content was updated; keeping the most current at the top. Share your feedback on Wetpaint Central.)