diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 18:25:58 +0000 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /lib/feature | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) | |
download | gitlab-ce-a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4.tar.gz |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'lib/feature')
-rw-r--r-- | lib/feature/active_support_cache_store_adapter.rb | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/feature/active_support_cache_store_adapter.rb b/lib/feature/active_support_cache_store_adapter.rb deleted file mode 100644 index 431f1169a86..00000000000 --- a/lib/feature/active_support_cache_store_adapter.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true - -# rubocop:disable Gitlab/NamespacedClass -# This class was already nested this way before moving to a separate file -class Feature - class ActiveSupportCacheStoreAdapter < Flipper::Adapters::ActiveSupportCacheStore - # This patch represents https://github.com/jnunemaker/flipper/pull/512. In - # Flipper 0.21.0 and later, we can remove this and just pass `write_through: - # true` to the constructor in `Feature.build_flipper_instance`. - - extend ::Gitlab::Utils::Override - - override :enable - def enable(feature, gate, thing) - result = @adapter.enable(feature, gate, thing) - @cache.write(key_for(feature.key), @adapter.get(feature), @write_options) - result - end - - override :disable - def disable(feature, gate, thing) - result = @adapter.disable(feature, gate, thing) - @cache.write(key_for(feature.key), @adapter.get(feature), @write_options) - result - end - - override :remove - def remove(feature) - result = @adapter.remove(feature) - @cache.delete(FeaturesKey) - @cache.write(key_for(feature.key), {}, @write_options) - result - end - end -end -# rubocop:disable Gitlab/NamespacedClass |