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

javascript - IndexedDB error: Uncaught DataCloneError: Failed to execute 'put' on 'IDBObjectStore': An object could not be cloned -

java - Unable to make sub reports with Jasper -

twitter bootstrap - Boostrap minimum scale with rotativa PDF -