dwightwatson/rememberable

Is there a better way to cache paginate?

0xuhe opened this issue · 1 comments

0xuhe commented
Item::paginate(20)->remember();

The first page query will be select * from items limit 20,
The sencond page query will be select * from items limit 20 offset 20

They are different raw query statement, so they will be cache twice.

Is there a better way to cache pagination?

0xuhe commented

stupid question!