Commit cd8d6688 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'add-missing-overrides' into 'master'

Add missing overrides for ActiveSupportCacheStoreAdapter

See merge request gitlab-org/gitlab!60125
parents 60a7d0a6 1f9eebf3
......@@ -4,18 +4,23 @@
# This class was already nested this way before moving to a separate file
class Feature
class ActiveSupportCacheStoreAdapter < Flipper::Adapters::ActiveSupportCacheStore
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)
......
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