Use the GitLab version as part of the appearances cache key
This prevents us from having to manually flush the cache key in migrations every time a new column is added. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/5571
This commit is contained in:
parent
eaed588bf2
commit
d209a05486
|
@ -16,7 +16,7 @@ class Appearance < ActiveRecord::Base
|
|||
|
||||
has_many :uploads, as: :model, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
|
||||
|
||||
CACHE_KEY = 'current_appearance'.freeze
|
||||
CACHE_KEY = "current_appearance:#{Gitlab::VERSION}".freeze
|
||||
|
||||
after_commit :flush_redis_cache
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Use the GitLab version as part of the appearances cache key
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
Loading…
Reference in New Issue