• Lin Jen-Shin's avatar
    Introduce Gitlab::Cache::RequestStoreWrap · 216bf78f
    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.
    216bf78f
pipeline_serializer_spec.rb 4.23 KB