Commit Graph

15 Commits

Author SHA1 Message Date
Heinrich Lee Yu 0c30052427
Use strong memoize utility 2018-11-26 17:41:41 +08:00
Heinrich Lee Yu 3b49a7948c
Prevent loading from cache if commit is nil 2018-11-26 17:41:40 +08:00
Heinrich Lee Yu 0047429a97
Cache project HEAD to prevent unnecessary Gitaly calls 2018-11-26 17:41:39 +08:00
Gabriel Mazetto cb541aef89 Change project pipeline status cache key to follow project convention
Old cache key was: `projects/#{id}/pipeline_status/#{sha}`
New one is: `project:#{id}:pipeline_status:#{sha}`

This allows to delete any project related key just by scanning for:
`project:#{id}`.
2018-11-16 16:22:53 +01:00
Matija Čupić 0079fa19ce
Remove cache_sha parameter 2018-10-26 14:53:04 +02:00
Matija Čupić dd2e91cc78
Cache pipeline status only for specific sha 2018-10-25 19:57:08 +02:00
gfyoung e166e5747c Enable some frozen string in lib/gitlab
Enable frozen string for the following files:

* lib/gitlab/auth/**/*.rb
* lib/gitlab/badge/**/*.rb
* lib/gitlab/bare_repository_import/**/*.rb
* lib/gitlab/bitbucket_import/**/*.rb
* lib/gitlab/bitbucket_server_import/**/*.rb
* lib/gitlab/cache/**/*.rb
* lib/gitlab/checks/**/*.rb

Partially addresses #47424.
2018-10-13 02:31:31 -07:00
Lin Jen-Shin 4b30aec0aa Allow `rake cache:clear` clearing pipeline status cache
* Use the correct key prefix
* Clear old cache keys

TODO:

At some point we could remove clearing old cache keys.
2018-04-10 20:57:00 +08:00
Paul Charlton cb3b4a15e6 Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Bob Van Landuyt 019b06b9d2 Load a project's CI status in batch from redis 2017-04-26 12:04:22 +00:00
Bob Van Landuyt 516a405eb2 Take the ref of a pipeline into account when caching status 2017-04-07 17:24:11 +02:00
Bob Van Landuyt 02072e17ab Rename `ProjectBuildStatus` -> `ProjectPipelineStatus` 2017-04-07 17:24:11 +02:00
Bob Van Landuyt a6d313001a Wrap updating of cache after pipeline transition in class method 2017-04-07 17:24:11 +02:00
Bob Van Landuyt 9082d1e046 Rename Ci::PipelineStatus -> Ci::ProjectBuildStatus 2017-04-07 17:24:11 +02:00