summaryrefslogtreecommitdiff
path: root/lib/gitlab/cache
Commit message (Collapse)AuthorAgeFilesLines
* Allow `rake cache:clear` clearing pipeline status cache44582-clear-pipeline-status-cacheLin Jen-Shin2018-04-101-1/+1
| | | | | | | | | * Use the correct key prefix * Clear old cache keys TODO: At some point we could remove clearing old cache keys.
* Use StrongMemoize and enable/disable cops properlyLin Jen-Shin2017-11-181-3/+4
|
* Add cop to make sure we don't use ivar in a moduleLin Jen-Shin2017-09-181-0/+1
|
* Whitelist or fix additional `Gitlab/PublicSend` cop violationsrs-more-public-send-whitelistsRobert Speicher2017-08-141-1/+1
| | | | | An upcoming update to rubocop-gitlab-security added additional violations.
* Rename the methods to make it fit with current nameLin Jen-Shin2017-07-181-9/+9
|
* Follow feedback on the merge requestLin Jen-Shin2017-07-181-14/+10
|
* Update the comments for the new functionalityLin Jen-Shin2017-07-181-3/+19
|
* Use RequestStoreWrap for Commit#authorLin Jen-Shin2017-07-181-12/+34
| | | | | | | We also try to use instance variable to cache the result if RequestStore is not available, so we could keep the same logic, using the same cache key. Also introduce a way to specify method specific cache key
* Add RequestStoreWrap to cache via RequestStoreLin Jen-Shin2017-07-171-0/+60
| | | | | | | | | | | | | | | | | 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.
* Support multiple Redis instances based on queue typePaul Charlton2017-07-111-5/+5
|
* Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon2017-06-211-2/+2
|
* Load a project's CI status in batch from redisBob Van Landuyt2017-04-261-9/+44
|
* Take the ref of a pipeline into account when caching statusBob Van Landuyt2017-04-071-9/+18
|
* Rename `ProjectBuildStatus` -> `ProjectPipelineStatus`Bob Van Landuyt2017-04-071-1/+1
|
* Wrap updating of cache after pipeline transition in class methodBob Van Landuyt2017-04-071-0/+4
|
* Rename Ci::PipelineStatus -> Ci::ProjectBuildStatusBob Van Landuyt2017-04-071-0/+90