Include adapter in cache key

Confirm caching attributes with different key json_api vs. attributes adapter

Adapted from @kevintyll's original test
https://github.com/rails-api/active_model_serializers/pull/1644#issuecomment-204147094
This commit is contained in:
kevintyll
2015-11-25 12:31:32 -05:00
committed by Benjamin Fleischer
parent e118599052
commit 16a3f93ce9
6 changed files with 127 additions and 31 deletions

View File

@@ -58,6 +58,10 @@ module ActiveModel
''.freeze
end
def _skip_digest?
_cache_options && _cache_options[:skip_digest]
end
# @api private
# Used by FragmentCache on the CachedSerializer
# to call attribute methods on the fragmented cached serializer.