Answer the question
In order to leave comments, you need to log in
Is this caching correct in Rails?
I'm trying to cache through the standard gem - cache_digest, but the application still creates queries to the database:
- cache @bgroups do
- @bgroups.each do |bgroup|
.bgroup
= link_to bgroup.name, bgroup_vacancy_path(bgroup)
Bgroup Load (0.3ms) SELECT "bgroups".* FROM "bgroups" LIMIT 20
Cache digest for app/views/home/index.html.haml: f62c6ca48d18920cf265aa17882d6e1a
Read fragment views/bgroups/1/bgroups/2/bgroups/3/ bgroups/4/bgroups/5/bgroups/6/bgroups/7/bgroups/8/bgroups/9/bgroups/10/bgroups/11/bgroups/12/bgroups/13/bgroups/14/bgroups/15/bgroups/ 16/bgroups/17/bgroups/18/bgroups/19/bgroups/20/f62c6ca48d18920cf265aa17882d6e1a (0.0ms)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question