Feed API V1 caching and last modified date

160 views
Skip to first unread message

sana

unread,
Mar 15, 2012, 4:26:06 AM3/15/12
to google-ajax...@googlegroups.com
Hi, I am using Feed API (v1) in my android application to read some feeds. Currently I poll the feed API once a hour, is there a way to know if the result is not modified. I am using

HttpURLConnection httpCon = (HttpURLConnection) url.openConnection();
long date = httpCon.getLastModified();

But the date is 0. Is it possible to look for 304 status from Feed API, this would greatly improve the performance and bandwidth.

The second question is about caching. There are some feeds that are not updated frequently by Feed API. Is there a way to ping FeedAPI (inside the Android app) to notify the feed is updated? If not, is there a way that the publisher of the feed can ping Feed API about the update? Thanks a lot.

Jeremy Geerdes

unread,
Mar 15, 2012, 8:27:14 AM3/15/12
to google-ajax...@googlegroups.com
As you have certainly realized, the API currently does not return a 304 status for unchanged feeds. So this would be a feature request. You could file it on the issue tracker at the link below:


Also, regarding your caching question, the dev team did an experiment with a v2 Feeds API which supported push notifications. The v2 API utilized pubsubhubbub to allow feeds publishers to notify Google servers when there was an update available, and Google servers would then pull the updated feed and push updates to clients via a persistent connection. Unfortunately, the v2 API was experimental and ultimately discontinued. As you've noticed, the v1 API does not have the facility to check for updates except via periodically pinging the feed. This is not done every time someone requests a feed from the service in order to improve performance and reduce network traffic for both Google and the feed provider. Sadly, though, there is no documented way for those feed providers to notify the API of updates and request that the cache be refreshed. Again, this would be a feature request, though I think it's already in the issue tracker. If it is, you'll want to star the issue so that the team knows you're interested.

Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

For more information or a project quote:

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msg/google-ajax-search-api/-/JmdMNSKwvW0J
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

sana

unread,
Mar 18, 2012, 6:36:07 AM3/18/12
to google-ajax...@googlegroups.com
Thanks for the reply. I took a look at the open issues and cannot find similar one so I posted one here  http://code.google.com/p/google-ajax-apis/issues/detail?id=621
Reply all
Reply to author
Forward
0 new messages