          ]
  
      @cached_property
      def _readable_fields(self):
          return [
              field for field in self.fields.values()
              if not field.write_only
          ]
  
      def get_fields(self):
          """
          Returns a dictionary of {field_name: field_instance}.
          """
 
</s> remove     @cached_property
 </s> add     @property </s> remove         return [
            field for field in self.fields.values() if not field.read_only
        ]
 </s> add         for field in self.fields.values():
            if not field.read_only:
                yield field </s> remove     @cached_property
 </s> add     @property </s> remove         assert len(serializer._writable_fields) == 1
 </s> add         assert len(list(serializer._writable_fields)) == 1
        for field in self.fields.values():
            if not field.write_only:
                yield field
          ]
  
      @cached_property
      def _readable_fields(self):
        for field in self.fields.values():
            if not field.write_only:
                yield field
        for field in self.fields.values():
            if not field.write_only:
                yield field
        for field in self.fields.values():
            if not field.write_only:
                yield field
        for field in self.fields.values():
            if not field.write_only:
                yield field
  
      def get_fields(self):
          """
          Returns a dictionary of {field_name: field_instance}.
          """
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Don't cache _readable_fields and _writable_fields (#6689)

It might be useful for a serializer with many many fields which uses
read_only and write_only on a large percentage of the fields. But the
memory usage and statefulness it adds are not worth it for the common
case. 
rest_framework/serializers.py