Commit 1f9eebf3 authored by Sean McGivern's avatar Sean McGivern

Add missing overrides for ActiveSupportCacheStoreAdapter

We are overriding methods defined in a gem (Flipper) here. The interface
in the gem is very stable but it's still worth using `override` in case
anything changes.
parent 26be8f2c
......@@ -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