Commit b98f7c95 authored by Igor's avatar Igor

Remove fallback to DEL, since we no longer support redis 3

parent 66d049bc
......@@ -55,9 +55,7 @@ module Gitlab
#
# @param type [Symbol] the type of resource, `:project` or `:namespace`
def delete(type)
Gitlab::Redis::Cache.with do |redis|
unlink_or_delete(redis, redis_key(type))
end
Gitlab::Redis::Cache.with { |redis| redis.unlink(redis_key(type)) }
end
private
......@@ -65,13 +63,6 @@ module Gitlab
def redis_key(type)
"elasticsearch_enabled_cache:#{type}"
end
def unlink_or_delete(redis, key)
redis.unlink(key)
rescue ::Redis::CommandError => e
Gitlab::ErrorTracking.log_exception(e)
redis.del(key)
end
end
end
end
......
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