Rails cache optimize

This uses the Rails caching mechanism to optimize database load on the application layer.
These optimizations were initially developed in #112 and rebased to the current staging branch.
Oh nice.. How does that work, does rails add the locale to the cache key?

> On Dec 9, 2014, at 10:47, Will Jordan <notifications@github.com> wrote:
> 
> In dashboard/app/views/shared/_user_stats.html.haml:
> 
> > -                - if unplugged
> > -                  %span.puzzle-named
> > -                    =sl.level_display_text
> > -                - elsif css_class == 'passed'
> > -                  = check_mark_html
> > -                - elsif css_class == 'perfect'
> > -                  = check_mark_html
> > -                - else 
> > -                  %span.puzzle-number
> > -                    =sl.level_display_text
> > -  = render partial: 'shared/user_stats_key'
> > --if script.trophies?
> > -  %div{style:"clear:both"}
> > -  #trophies
> > -    =render partial: 'shared/concept_trophy_block', locals: { concept_progress: concept_progress, user: user, added_style: 'padding:10px;' }
> > +- cache([@script, user || session[:progress]]) do
> Switching languages seems to work ok in basic tests.
> 
> —
> Reply to this email directly or view it on GitHub.
>