Commit d209a054 authored by Stan Hu's avatar Stan Hu

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
parent eaed588b
......@@ -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
......
---
title: Use the GitLab version as part of the appearances cache key
merge_request:
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment