Open
Description
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?
Metadata
Metadata
Assignees
Labels
No labels