Follow-up from "Draft: Invalidate ES cache when projects or groups are transferred"

The following discussion from !50712 (merged) should be addressed:

  • @DylanGriffith started a discussion:

    I'm kinda confused why we're tying the visibility_level changes to the use_elasticsearch? change. Is this because the caching will lead to invalid results the first time we try to update this? I'm guessing that's what's going on but I wonder if there is a more elegant way of doing this because now we're duplicating this logic and performing the same update twice.