Wednesday, 15 January 2014

yql - When caching response what would be a reasonable value for maxage header when response does not change? -



yql - When caching response what would be a reasonable value for maxage header when response does not change? -

i have yql query returns info know sure not ever change. in order avoid rate limits, thinking of adding maxage header yql response.

now i'm wondering reasonable value (in case know response never ever change): year ? 10 years ? more ?

are there specificities way yql treat maxage header ?

nice article on maxage , how utilize it: http://www.yqlblog.net/blog/2010/03/12/avoiding-rate-limits-and-getting-banned-in-yql-and-pipes-caching-is-your-friend/ . should reply of queries max age.

for sec question, if response never ever change, why create api phone call in first place? eliminate network latency altogether , have conf/property file having response on server itself.

am not quite sure if understood meant if there specifications way yql treat header seek reply best of knowledge. link shared earlier, next few lines:

secondly can inquire yql cache response statement longer – append _maxage query parameter phone call , result stored in cache length of time (but not shorter have been originally):

http://query.yahooapis.com/v1/public/yql?q=select * weather.forecast location=90210&_maxage=3600

this useful when you’re using output table that’s not caching plenty or xml source without having open table work

hope helps.

yql

No comments:

Post a Comment