diff options
author | Stan Hu <stanhu@gmail.com> | 2018-04-05 22:52:20 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-04-05 22:55:12 +0300 |
commit | d209a05486503f1dd6412c777c1fd29fe02f0a40 (patch) | |
tree | 7a8b55d3cba1348ee78b78df069cdea2eebf14d0 /app/models | |
parent | eaed588bf228c833cb666a61bc7d25cf21d5f94b (diff) |
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
Diffstat (limited to 'app/models')
-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 |