ruby on rails - How to cache data to use in a dashboard page -


in application, after user logs in, redirect dashboard page, can return every time during session. data in page not change during time, need cache somehow.

is rails responsible me, or need manually?

for now, dashboard display, among others, search:

#how many men? @men = horario.joins(:paciente).     where(:data => date.today).     where(pacientes: {sexo: masculino}).count  @total = horario.where(:data => date.today).count @women = @total - @men 

if you, i'd use fragment caching dashboard part.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Save and close a word document by giving a name in R -