gitlab-org--gitlab-foss/spec/finders
Yorick Peterse 154253cab5
Refactor TrendingProjectsFinder to support caching
== Public Projects

This finder class now _only_ returns public projects. Previously this
finder would also return private and internal projects. Including these
projects makes caching data much harder and less efficient. Meanwhile
including this data isn't very useful as very few users would be
interested in seeing projects they have access to as trending. That is,
the feature is more useful when you want to see what _other_ popular
projects there are.

== Caching

The data returned by TrendingProjectsFinder is now cached for a day
based on the number of months the data should be restricted to. The
cache is not flushed explicitly, instead it's rebuilt whenever it
expires.

== Timings

To measure the impact I changed the finder code to use the last 24
months instead of the last month. I then executed and measured 10
requests to the explore page. On the current "master" branch (commit
88fa5916ff) this would take an average of
2.43 seconds. Using the changes of this commit this was reduced to
around 1.7 seconds.

Fixes gitlab-org/gitlab-ce#22164
2016-10-05 16:39:03 +02:00
..
access_requests_finder_spec.rb Enable Lint/StringConversionInInterpolation cop and autocorrect offenses 2016-10-03 16:09:57 +02:00
branches_finder_spec.rb Add failing test for #20462 2016-08-02 03:32:28 +02:00
contributed_projects_finder_spec.rb Align hash literals to keep Rubocop happy 2015-11-18 13:27:03 +01:00
group_projects_finder_spec.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
groups_finder_spec.rb Improve group visibility level feature 2016-03-18 16:58:04 -03:00
issues_finder_spec.rb fix issues mr counter 2016-09-20 14:39:15 +01:00
joined_groups_finder_spec.rb Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
merge_requests_finder_spec.rb fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01:00
move_to_project_finder_spec.rb Move to project dropdown with infinite scroll for better performance 2016-08-18 15:31:51 +02:00
notes_finder_spec.rb fixes part1 of files to start using active tense 2016-08-09 15:06:23 +01:00
personal_projects_finder_spec.rb Improve group visibility level feature 2016-03-18 16:58:04 -03:00
pipelines_finder_spec.rb Improve PipelinesFinder spec so that it does not depend on hard-coded database IDs 2016-09-09 16:21:46 -04:00
projects_finder_spec.rb Allow Member.add_user to handle access requesters 2016-09-28 09:43:00 +02:00
snippets_finder_spec.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
tags_finder_spec.rb add specs for tags finder 2016-08-31 19:16:47 +01:00
todos_finder_spec.rb Todos sorting dropdown 2016-08-19 16:14:20 -03:00
trending_projects_finder_spec.rb Refactor TrendingProjectsFinder to support caching 2016-10-05 16:39:03 +02:00