Do the page 'cursors' on the Twitter Api change. What I mean by this is if the cursor ID for the second page of results was 123456789 will it still be the same every time or does it change.
For example if
http://api.twitter.com/1/followers/ids.json&am开发者_StackOverflowp;screen_name=XXXXXXX&cursor=123456789
returns followers X, Y, Z for user XXXXXXX, will it always return X, Y, Z (assuming X, Y, Z are still following that user)
Cursors essentially do not change.
A cursor is an opaque deletion-tolerant index into a Btree keyed by source userid and modification time. It brings you to a point in time in the reverse chron sorted list. So, since you can't change the past, other than erasing it, it's effectively stable. (Modifications bubble to the top.) But you have to deal with additions at the list head and also block shrinkage due to deletions, so your blocks begin to overlap quite a bit as the data ages. (If you cache cursors and read much later, you'll see the first few rows of cursor[n+1]'s block as duplicates of the last rows of cursor[n]'s block. The intersection cardinality is equal to the number of deletions in cursor[n]'s block). Still, there may be value in caching these cursors and then heuristically rebalancing them when the overlap proportion crosses some threshold.
https://groups.google.com/forum/#!msg/twitter-development-talk/cStHZQKNUnw/1ucp0gfwWvAJ
精彩评论