Created
August 15, 2013 23:22
-
-
Save tibbon/6245906 to your computer and use it in GitHub Desktop.
Rails caching strategy
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
// The parameter for search-name should be sanitized in some way of course | |
@api_result = Rails.cache.fetch("foursquare-#{search-name}") do | |
Foursquare.search(search-name) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment