class RecordSerializer include JSONAPI::Serializer attributes :duration, :user_id, :task_id, :is_handled, :handled_by_id cache_options store: Rails.cache, namespace: 'jsonapi-serializer', expires_in: 1.hour end