You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now I includes up to 6 realtions in my query, to avoid n+1 queries. Building up this Object tree takes a lot of the time. Sometimes more that querying the data and processing the jbuilder. How about we only do it, if the cache is empty for this object.
I would imagine something like!
Get only fields to generate cache_key from db like id, updated_at without building the object tree
Get data from cache
Get remaining data where cache was missed from database and process block for them, return cache for the others
What do you think?
The text was updated successfully, but these errors were encountered:
Right now I
includes
up to 6 realtions in my query, to avoidn+1
queries. Building up this Object tree takes a lot of the time. Sometimes more that querying the data and processing the jbuilder. How about we only do it, if the cache is empty for this object.I would imagine something like!
id
,updated_at
without building the object treeWhat do you think?
The text was updated successfully, but these errors were encountered: