4 things you can try before using a counter cache in rails
19-May-2022 1050
Maybe you have heard about the counter cache feature.A counter cache makes finding the number of belonging objects more efficient by keeping a column with the count.Rails makes it easy to implement it, but is not free. Sometimes it may be better not to use it.Here are four things you could try before or instead of using a counter cache, without introuducing n 1 queries.
4 things you can try before using a counter cache in rails #ruby #rubydeveloper #rubyonrails #things #before #using #counter #cache #rails https://rubyonrails.ba/link/4-things-you-can-try-before-using-a-counter-cache-in-rails