- Notifications
You must be signed in to change notification settings - Fork302
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
At the moment, we have {...,"meta": {"user": {"liked":true,"saved":false } }} In this case, I make a new DB query on every resource that the API returns, since this requires checking if the resource is in the user's library. This query can be omitted if the user is not logged in or the request has ATM, I need to decide whether to prefetch all the users or none of them and make an extra query. Is there any way to accomplish this or not? My suggestion in case this is not yet possible is to add a Note: After writing this I realized I can avoid making a new DB query using |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
-
Prefetching is a topic which needs to be improved within DJA however it is also not an easy task. Best take a look at discussion#921 to see what approaches are being discussed, and there are also some code bits and PRs referenced. My feeling is that we should make auto prefetching as best as possible. But when it cannot cover what is needed, it should be possible to simply disable it and a DJA user can then do their own optimization within their code (like overwriting |
BetaWas this translation helpful?Give feedback.