class TaskSerializer include JSONAPI::Serializer attributes :name, :description, :user_id, :activity_id cache_options store: Rails.cache, namespace: 'jsonapi-serializer', expires_in: 1.hour end