Skip to content

Commit 0fea667

Browse files
committed
Use MD5 when hashing cache field
Object.hash does not result in the same values across ruby invocations
1 parent 3ed4d4f commit 0fea667

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/jsonapi/basic_resource.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ def attribute_caching_context(_context)
10191019

10201020
# Generate a hashcode from the value to be used as part of the cache lookup
10211021
def hash_cache_field(value)
1022-
value.hash
1022+
Digest::MD5.hexdigest(value.to_s)
10231023
end
10241024

10251025
def _model_class

0 commit comments

Comments
 (0)