lib/autobots/helpers/caching.rb in autobots-0.2.2 vs lib/autobots/helpers/caching.rb in autobots-0.2.3
- old
+ new
@@ -44,10 +44,10 @@
protected
def serializer_cache_key
return @serializer_cache_key if defined?(@serializer_cache_key)
- @serializer_cache_key = [serializer.name, Digest::SHA256.hexdigest(serializer._attributes.keys.to_s)[0..12]]
+ @serializer_cache_key = [serializer.name, Digest::SHA256.hexdigest(serializer._attributes.keys.to_s + serializer._associations.keys.to_s)[0..12]]
end
def cache_key(object, _)
[object.cache_key, *self.serializer_cache_key, 'serializable-hash']
end
\ No newline at end of file