diff options
author | Stan Hu <stanhu@gmail.com> | 2018-07-07 07:49:48 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-07-07 07:49:48 +0300 |
commit | ddaf8c9cb8ed4cd7f58641d6a207a0d123b0592d (patch) | |
tree | 856f936baa0275103bfa6681b2a82fa4b440d8ff /app/models/concerns | |
parent | 270580f97c6a74f574162ef00b03f2eebb7fdbc9 (diff) | |
parent | f349f2a68c290ef0bfa9c32777426f8be86c0e43 (diff) |
Merge branch '48670-application-settings-may-not-be-invalidated-if-migrations-are-run' into 'master'
Resolve "Application settings may not be invalidated if migrations are run"
Closes #48670
See merge request gitlab-org/gitlab-ce!20389
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/cacheable_attributes.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/cacheable_attributes.rb b/app/models/concerns/cacheable_attributes.rb index d58d7165969..606549b947f 100644 --- a/app/models/concerns/cacheable_attributes.rb +++ b/app/models/concerns/cacheable_attributes.rb @@ -7,7 +7,7 @@ module CacheableAttributes class_methods do def cache_key - "#{name}:#{Gitlab::VERSION}:#{Gitlab.migrations_hash}:#{Rails.version}".freeze + "#{name}:#{Gitlab::VERSION}:#{Rails.version}".freeze end # Can be overriden @@ -69,6 +69,6 @@ module CacheableAttributes end def cache! - Rails.cache.write(self.class.cache_key, self) + Rails.cache.write(self.class.cache_key, self, expires_in: 1.minute) end end |