Another day, another App Engine issue - solved!

Seems everyday I am discovering new issues with Google App Engine. Today, I implemented the Qik video channel for the conference, which pulls in the media RSS feed from Qik and displays the latest videos from the <head> event on Qik.

Unfortunately, Google App Engine's urlfetch api caches requests and doesn't give you a means not to cache the results or to set the cache duration (an issue that has been discussed several times on the forum too.)

For us, this means that there's an unknown delay between when you record your video and when it shows up on the video page, even though it is added to the Qik RSS immediately after it is recorded.

There is an open issue for this. Please star! Thanks! :)

Update: Thanks to argladd86 on the App Engine issue tracker, this problem has now been solved! :)

The solution involves using the max-age property, as shown below:

fetch_headers = {'Cache-Control':'no-cache,max-age=0', 'Pragma':'no-cache'}
qik_rss_result = urlfetch.fetch("http://qik.com/event/rss/397/ltheadgt-web-conference", None, urlfetch.GET, fetch_headers)

Post Metadata

Date
October 6th, 2008

Author
Aral

Tags


13 Comments

  1. Can’t you just append a dummy request parameter like http://xxx.com/resource?dummy=193039

    This is standard practice for loading images in Javascript so they don’t cache, perhaps this won’t work in your case however.

    Please don’t be offended, but you should spend less time debugging Google App Engine for them or get paid for it. You can set up your own Amazon server instance with Django for $2.40/day and say goodbye to the 1000 element (or 1 megabyte) limits.





  2. thank you very much
    regards


  3. thanx you men ;) very good app code








  4. should spend less time debugging Google App Engine for them or get paid for it. You can set up your own Amazon server instance with Django for $2.40/day and say goodbye to the 1000 element


Leave a Reply

Anti-Spam Protection by WP-SpamFree