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
Caching API looks really awesome, seems like it will bring big performance gains in my app which has many heavy objects.
One question, is it possible to do two-pass implementation something like:
Query DB for only object ID and updated_at (lightweight query)
Send ID + timestamp list for serializer, serializer readies the objects which it has cached and returns the list of only those IDs which are not cached
Query the DB again for the full objects with ID list from step 2 which aren't cached (heavy query)
Serializer outputs full set objects from steps 2 (cached) and 3 (heavy query)
The text was updated successfully, but these errors were encountered:
Hey @johnnyshields, indeed it was built to increase performance, and we have made some cool benchmarks.
I can see some ways to do what you want, but there is no easy way here. The cache key generated by AMS 0.10rc only use the class name, id and updated_at, but is still expects and instance of the element itself. You can workaround it, by creating a new instance of it with only this parameters, but idk, the best way is doing some POC.
Let me know if we can help you with that, and I would also recommend you to post this question on stackOverflow under the ams and active-model-serializer tag, so people might find it easily. I'm closing the issue, but make yourself comfortable to post the link to the stackOverflow question here or even update this thread.
Caching API looks really awesome, seems like it will bring big performance gains in my app which has many heavy objects.
One question, is it possible to do two-pass implementation something like:
The text was updated successfully, but these errors were encountered: