aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/collection_cache_key.rb
diff options
context:
space:
mode:
authorDmitri Dolguikh <dmitri@appliedlogic.ca>2017-11-29 16:27:27 -0800
committerDmitri Dolguikh <dmitri@appliedlogic.ca>2017-12-12 11:23:54 -0800
commit82822a34217503336d51b7baab82cd18cf71e435 (patch)
tree478fd6d03d57db8a45d0bade4eb4702850a003ed /activerecord/lib/active_record/collection_cache_key.rb
parentd2aca50bbd69c7a12cdcbeaba3dbef2679927b90 (diff)
downloadrails-82822a34217503336d51b7baab82cd18cf71e435.tar.gz
rails-82822a34217503336d51b7baab82cd18cf71e435.tar.bz2
rails-82822a34217503336d51b7baab82cd18cf71e435.zip
Introduced `ActiveSupport::Digest` that allows to specify hash function implementation
and defaults to `Digest::MD5`. Replaced calls to `::Digest::MD5.hexdigest` with calls to `ActiveSupport::Digest.hexdigest`.
Diffstat (limited to 'activerecord/lib/active_record/collection_cache_key.rb')
-rw-r--r--activerecord/lib/active_record/collection_cache_key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/collection_cache_key.rb b/activerecord/lib/active_record/collection_cache_key.rb
index 88b398ad45..023d144693 100644
--- a/activerecord/lib/active_record/collection_cache_key.rb
+++ b/activerecord/lib/active_record/collection_cache_key.rb
@@ -3,7 +3,7 @@
module ActiveRecord
module CollectionCacheKey
def collection_cache_key(collection = all, timestamp_column = :updated_at) # :nodoc:
- query_signature = Digest::MD5.hexdigest(collection.to_sql)
+ query_signature = ActiveSupport::Digest.hexdigest(collection.to_sql)
key = "#{collection.model_name.cache_key}/query-#{query_signature}"
if collection.loaded?