gpt4 book ai didi

推特光标

转载 作者:行者123 更新时间:2023-12-02 14:40:52 25 4
gpt4 key购买 nike

Twitter Api 上的页面“光标”是否发生变化。我的意思是,如果第二页结果的光标 ID 是 123456789,它每次仍然相同还是会发生变化。

例如,如果

http://api.twitter.com/1/followers/ids.json&screen_name=XXXXXXX&cursor=123456789

返回用户 XXXXXXX 的关注者 X、Y、Z,是否始终返回 X、Y、Z(假设 X、Y、Z 仍在关注该用户)

最佳答案

光标本质上不会改变。

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

关于推特光标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5302020/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com