I'm working on a web program (with PHP) that uses data from Google Contacts (via People API
, but I'm willing to switch to a different API if this is what it takes). The problem is that getting lots of data from google every time is slow.
To speed things up I want to cache the data in my database, but I still need to make sure the information is always up to date.
In Google Calendar I can use Push Notifications for this purpose, but as far as I know there is no such thing in any of Google Contacts' APIs.
Is there a way to quickly check if any changes were made without requesting the data of all the contacts?
You don't have to write code, just point me in the right direction :)
What I know so far
I can check if the contact's etag
matches the cached etag
to find out whether the contact was edited since it was last cached, but it still requires requesting some of the data of all the contacts to compare the etag
s, so I end up reducing the traffic by not requesting ALL the data until I know I need it, but it's still more network traffic than I would like.