-
- Downloads
Cache & flush tag/branch counts
The methods used for this are Repository#tag_count and Repository#branch_count which cache their output in Redis as well as memoizing it in an instance variable. Both methods have a corresponding methods/hooks to flush the caches at the right time.
Showing
- app/models/repository.rb 30 additions, 3 deletionsapp/models/repository.rb
- app/services/git_tag_push_service.rb 1 addition, 1 deletionapp/services/git_tag_push_service.rb
- app/views/projects/branches/destroy.js.haml 1 addition, 1 deletionapp/views/projects/branches/destroy.js.haml
- app/views/projects/commits/_head.html.haml 2 additions, 2 deletionsapp/views/projects/commits/_head.html.haml
- spec/models/repository_spec.rb 44 additions, 3 deletionsspec/models/repository_spec.rb
- spec/services/delete_tag_service_spec.rb 26 additions, 0 deletionsspec/services/delete_tag_service_spec.rb
spec/services/delete_tag_service_spec.rb
0 → 100644
Please register or sign in to comment