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
This commit is contained in:
Sean McGivern 2018-06-14 09:34:38 +00:00
commit cc553ed8f0
3 changed files with 10 additions and 0 deletions

View file

@ -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,

View file

@ -0,0 +1,5 @@
---
title: Invalidate cache with project details when repository is updated
merge_request: 19774
author:
type: fixed

View file

@ -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")