Created
November 29, 2012 14:42
-
-
Save andreareginato/4169517 to your computer and use it in GitHub Desktop.
Searchable cache key
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 self.cache_key | |
Digest::MD5.hexdigest "#{scoped.max(:updated_at).to_i}-#{scoped.min(:updated_at)}-#{scoped.count}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment