diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-24 21:09:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-24 21:09:14 +0300 |
commit | 72875e4a370cf2014e7bb35633d63ccb938e4edb (patch) | |
tree | 927761bf7c89a3cedeab6b2c28f04cbffda7a587 /app/helpers/whats_new_helper.rb | |
parent | 94c1ea61908ce610ba40786e2d80d5701acd8cbf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/whats_new_helper.rb')
-rw-r--r-- | app/helpers/whats_new_helper.rb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/app/helpers/whats_new_helper.rb b/app/helpers/whats_new_helper.rb index 283d443f51b..f267ede3153 100644 --- a/app/helpers/whats_new_helper.rb +++ b/app/helpers/whats_new_helper.rb @@ -1,25 +1,15 @@ # frozen_string_literal: true module WhatsNewHelper - include Gitlab::WhatsNew - def whats_new_most_recent_release_items_count - Gitlab::ProcessMemoryCache.cache_backend.fetch('whats_new:release_items_count', expires_in: CACHE_DURATION) do - whats_new_release_items&.count - end + ReleaseHighlight.most_recent_item_count end def whats_new_storage_key - return unless whats_new_most_recent_version - - ['display-whats-new-notification', whats_new_most_recent_version].join('-') - end + most_recent_version = ReleaseHighlight.most_recent_version - private + return unless most_recent_version - def whats_new_most_recent_version - Gitlab::ProcessMemoryCache.cache_backend.fetch('whats_new:release_version', expires_in: CACHE_DURATION) do - whats_new_release_items&.first&.[]('release') - end + ['display-whats-new-notification', most_recent_version].join('-') end end |