Skip to content
  • Lin Jen-Shin's avatar
    Introduce Gitlab::Cache::RequestStoreWrap · dbffead222f2
    Lin Jen-Shin authored
    So that we cache the result of UserAccess#can_push_or_merge_to_branch?
    in RequestStore, avoiding querying ProtectedBranch over and over for
    the list of pipelines (i.e. in PipelineSerializer)
    
    I don't think this is ideal because I don't like the idea of
    RequestStore in general, but this is the easiest way to cache it
    without changing the architecture. In the future we should cache
    more explicitly rather than this kind of global store.
    dbffead222f2