Created
September 22, 2009 17:43
-
-
Save mlomnicki/191256 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_family_view_for_state_with_caching(state, action_view) | |
return find_family_view_for_state(state, action_view) unless ActionController::Base.perform_caching | |
key = "#{state}/#{action_view.template_format}" | |
self.class.state2view_cache[key] ||= find_family_view_for_state(state, action_view) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment