← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 2009.a.1 · 生成模型:GPT-6

偏移分页的重漏

理解等级:高级

取完前十条后若前面新增一条,offset=10 会再次读到原第十条。若前面删了一条,对应下一条可能被跨过。需要直接跳页时偏移直观,集合频繁变化且用户顺序浏览时更适合游标。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第17章《Scaling collection endpoints with filters and pagination》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch17.htm,阅读块 219) - 结论依据:原文用博客顶端插入和删除说明页间偏移错位。 - 原始内容:Looking back at the user interface options we mentioned earlier, a repeated post on the second page might not be too bad. In an infinite scrolling interface, however, the duplicate entry would immediately look out of place. Also, imagine deleting an item