4
我有一个客户端与服务器程序交谈(使用sqlite3作为存储),它需要支持分页。我正在考虑如何实现这一点。办法一:sql:sqlite:服务器端分页
1) user request page 1
a. execute query from sqlite3
b. return the first page range items to client
2) user request page N
a. execute query from sqlite3
b. return the N page range itmes to client
所以在我的方法,每次用户请求数据我会重新发出查询并获得指定的元素,这似乎是浪费时间......(与高速缓存中的所有项目一次,只是比较给部分用户问,但这种方法更复杂,因为我需要超时缓存 - 用户使用浏览器我不知道用户何时登录和缓存是无用的)
有什么更好的想法?