diff options
author | Stan Hu <stanhu@gmail.com> | 2018-04-05 12:52:20 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-04-05 12:55:12 -0700 |
commit | d209a05486503f1dd6412c777c1fd29fe02f0a40 (patch) | |
tree | 7a8b55d3cba1348ee78b78df069cdea2eebf14d0 /app/models/appearance.rb | |
parent | eaed588bf228c833cb666a61bc7d25cf21d5f94b (diff) | |
download | gitlab-ce-d209a05486503f1dd6412c777c1fd29fe02f0a40.tar.gz |
Use the GitLab version as part of the appearances cache keysh-appearance-cache-key-version
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
Diffstat (limited to 'app/models/appearance.rb')
-rw-r--r-- | app/models/appearance.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/appearance.rb b/app/models/appearance.rb index 2a6406d63c7..fb66dd0b766 100644 --- a/app/models/appearance.rb +++ b/app/models/appearance.rb @@ -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 |