summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2018-06-14 09:34:38 +0000
committerSean McGivern <sean@mcgivern.me.uk>2018-06-14 09:34:38 +0000
commitcc553ed8f03dbbe88272ffe1a2b1bbb5b05f4489 (patch)
tree3f6a81cc5c62aea6256478a4602f72ef46d30d35
parent6c32093dd268675fb9db3a1fc1025ab22e04e4c2 (diff)
parent6a0178d8324964489654eb26fbefcb90bbcd1147 (diff)
downloadgitlab-ce-cc553ed8f03dbbe88272ffe1a2b1bbb5b05f4489.tar.gz
Merge branch 'rd-33733-showing-created-date-instead-of-updated-date-in-project-lists' into 'master'
Invalidate cache with project details when repository is updated Closes #33733 See merge request gitlab-org/gitlab-ce!19774
-rw-r--r--app/helpers/projects_helper.rb1
-rw-r--r--changelogs/unreleased/rd-33733-showing-created-date-instead-of-updated-date-in-project-lists.yml5
-rw-r--r--spec/helpers/projects_helper_spec.rb4
3 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index cdbb572f80a..e847baf0d52 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -171,6 +171,7 @@ module ProjectsHelper
key = [
project.route.cache_key,
project.cache_key,
+ project.last_activity_date,
controller.controller_name,
controller.action_name,
Gitlab::CurrentSettings.cache_key,
diff --git a/changelogs/unreleased/rd-33733-showing-created-date-instead-of-updated-date-in-project-lists.yml b/changelogs/unreleased/rd-33733-showing-created-date-instead-of-updated-date-in-project-lists.yml
new file mode 100644
index 00000000000..3934381b0cf
--- /dev/null
+++ b/changelogs/unreleased/rd-33733-showing-created-date-instead-of-updated-date-in-project-lists.yml
@@ -0,0 +1,5 @@
+---
+title: Invalidate cache with project details when repository is updated
+merge_request: 19774
+author:
+type: fixed
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index d372e58f63d..815b4035114 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -90,6 +90,10 @@ describe ProjectsHelper do
expect(helper.project_list_cache_key(project)).to include(project.cache_key)
end
+ it "includes the last activity date" do
+ expect(helper.project_list_cache_key(project)).to include(project.last_activity_date)
+ end
+
it "includes the controller name" do
expect(helper.controller).to receive(:controller_name).and_return("testcontroller")