mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Use ActiveSupport::Cache.expand_cache_key for cache key expansions (#1878)
* Use ActiveSupport::Cache.expand_cache_key for cache key expansions
This commit is contained in:
committed by
Benjamin Fleischer
parent
6de3f31b6e
commit
5f3bdcc87c
@@ -263,7 +263,11 @@ module ActiveModel
|
||||
parts << object_cache_key
|
||||
parts << adapter_instance.cache_key
|
||||
parts << serializer_class._cache_digest unless serializer_class._skip_digest?
|
||||
@cache_key = parts.join('/')
|
||||
@cache_key = expand_cache_key(parts)
|
||||
end
|
||||
|
||||
def expand_cache_key(parts)
|
||||
ActiveSupport::Cache.expand_cache_key(parts)
|
||||
end
|
||||
|
||||
# Use object's cache_key if available, else derive a key from the object
|
||||
|
||||
Reference in New Issue
Block a user