Cache paginator aggregate count #48607
Unanswered
sathia-musso
asked this question in
Ideas
Replies: 1 comment 1 reply
-
First of all, it is a bad thing to put cache inside a builder. Standard paginator is known to be slow. Use simple pagination or cursor pagination. If us need a count, you can make a separate method for it. And, you can always create your own paginator with cache and stuff. P.S.: Do not forget about bindings:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I found that on a large-ish datasets simple queries such as:
can take a lot of time (yes,
deleted_at
is an index), and it would be probably better to cache them for a little while, how about something like this in the Builder class?this should prevent any collision and provide a good method to make paginator fast
Beta Was this translation helpful? Give feedback.
All reactions