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 - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -