summaryrefslogtreecommitdiff
path: root/.ruby-version
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-07-17 23:24:46 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-07-17 23:24:46 +0800
commit143fc48abac6e278dcda9be4b90cb3ca1291f4d9 (patch)
tree4792cf5eff9665810c52d27507f64ea17465527a /.ruby-version
parent05329d4a364a5c55f2de9546871de1909b6be3f5 (diff)
downloadgitlab-ce-143fc48abac6e278dcda9be4b90cb3ca1291f4d9.tar.gz
Add RequestStoreWrap to cache via RequestStore
I don't like the idea of `RequestStore` at all, because it's just a global state which shouldn't be used at all. But we have a number of places calling `ProtectedBranch.protected?` and `ProtectedTag.protected?` in a loop for the same user, project, and ref whenever we're checking against if the jobs for a given pipeline is accessible for a given user. This means we're effectively making N queries for the same thing over and over. To properly fix this, we need to change how we check the permission, and that could be a huge work. To solve this quickly, adding a cache layer for the given request would be quite simple to do. We're already doing this in Commit#author, and this is extending that idea and make it generalized.
Diffstat (limited to '.ruby-version')
0 files changed, 0 insertions, 0 deletions