0

YQL cache test

I am retrieving an XML file using YQL and would like to determine if caching by YQL is working. I used the following statement in the YQL console

use "http://dl.dropbox.com/u/5095342/Conformance/Player/x3dom/x3d.xml" as x3d; select * from x3d where url="http://dl.dropbox.com/u/5095342/Conformance/Geometry/Box/cachetest.x3d"

and in my datatable I set the response.maxAge = 300; so that the response will be cached for five minutes.

If I go in and change the contents of the file the file cachetest.x3d and then run the YQL statement in YQL console before the 5 minutes is up I get back a response with my latest changes. I was expecting to get back cached content from the first call to YQL before I made the changes. Why am I not seeing cached content? How can I tell if I am getting cached content back from YQL? 

by
  • a
  • Mar 22, 2012
1 Reply
  • If you look at the response headers you should see a Warning header when stale data is served. We do serve stale date from our caching servers, as they implement the Stale While Revalidate feature as described here http://www.mnot.net/blog/2007/12/12/stale<br><br><div class="quote"><div class="quotetop">QUOTE<cite>(a @ 22 Mar 2012 10:42 AM)</cite></div><blockquote class="quotemain"><span style="color:#333333;font-family:Verdana, sans-serif;line-height:19px;text-align:left;">I am retrieving an XML file using YQL and would like to determine if caching by YQL is working. I used the following statement in the YQL console</span><br><br><span style="color:#333333;font-family:Verdana, sans-serif;line-height:19px;text-align:left;">use &quot;http://dl.dropbox.com/u/5095342/Conformance/Player/x3dom/x3d.xml&quot; as x3d; select * from x3d where url=&quot;http://dl.dropbox.com/u/5095342/Conformance/Geometry/Box/cachetest.x3d&quot;</span><br><br><span style="color:#333333;font-family:Verdana, sans-serif;line-height:19px;text-align:left;">and in my datatable I set the response.maxAge = 300; so that the response will be cached for five minutes.</span><br><br><span style="color:#333333;font-family:Verdana, sans-serif;line-height:19px;text-align:left;">If I go in and change the contents of the file the file cachetest.x3d and then run the YQL statement in YQL console before the 5 minutes is up I get back a response with my latest changes. I was expecting to get back cached content from the first call to YQL before I made the changes. Why am I not seeing cached content? How can I tell if I am getting cached content back from YQL?</span>&nbsp;</blockquote></div>
    0

Recent Posts

in YQL