mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Remove unnecessary Serializer#cached_fields
This commit is contained in:
@@ -206,15 +206,6 @@ module ActiveModel
|
||||
end
|
||||
end
|
||||
|
||||
# Get attributes from @cached_attributes
|
||||
# @return [Hash] cached attributes
|
||||
# def cached_attributes(fields, adapter_instance)
|
||||
def cached_fields(fields, adapter_instance)
|
||||
cache_check(adapter_instance) do
|
||||
attributes(fields)
|
||||
end
|
||||
end
|
||||
|
||||
def cache_check(adapter_instance)
|
||||
if self.class.cache_enabled?
|
||||
self.class.cache_store.fetch(cache_key(adapter_instance), self.class._cache_options) do
|
||||
|
||||
Reference in New Issue
Block a user