Hmm… you should try turning caching on in development or test and seeing if
that even works ;)


./environments/development.rb:  config.action_controller.perform_caching =
false
./environments/production.rb:  config.action_controller.perform_caching =
true
./environments/staging.rb:  config.action_controller.perform_caching = true
./environments/test.rb:  config.action_controller.perform_caching = false



On Tue, Apr 29, 2014 at 2:48 PM, Will Jordan <notifications@github.com>wrote:

> In app/models/script_level.rb:
>
> > @@ -30,7 +32,14 @@ def stage_or_game_position
> >    end
> >
> >    def self.cache_find(id)
> > -    @@script_level_map ||= ScriptLevel.includes(:level, :script).index_by(&:id)
> > -    @@script_level_map[id]
> > +    Rails.cache.fetch("script_level/#{id}/#{@@last_updated}") {
>
> Default cache_store is FileStore according to RailsGuide<http://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-filestore>.
> Maybe setting this to MemoryStore would be better for our largely-static
> model classes? (also: I'm new to Rails, I don't know if this is at all an
> improvement over caching via class-variable storage, or if we should just
> leave this stuff as it was)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/code-dot-org/dashboard/pull/531/files#r12118787>
> .
>