Skip to content

Add caching to the protected branch check

What does this MR do?

In the quest to cache some elements of Projects::MergeRequests::ContentController#widget.json, this MR caches the call to check if a branch is protected or not in a project. This has the benefit of making widget.json's source_branch_protected attribute load faster on subsequent loads.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #332969

Edited by Gary Holtz

Merge request reports