Commit 0c2fedc0 authored by Kerri Miller's avatar Kerri Miller

Remove unused method for retreiving single entries from cache

parent 82e3c537
......@@ -74,12 +74,6 @@ module Gitlab
end
end
def read_single_entry_from_redis_hash(diff_file_id)
Redis::Cache.with do |redis|
redis.hget(key, diff_file_id)
end
end
def clear
Redis::Cache.with do |redis|
redis.del(key)
......
......@@ -93,22 +93,6 @@ describe Gitlab::Diff::HighlightCache, :clean_gitlab_redis_cache do
end
end
describe '#read_single_entry_from_redis_hash' do
let(:backend) { Rails.cache }
before do
cache.write_to_redis_hash(diff_hash)
end
it 'returns highlighted diff content for a single file as JSON' do
diff_hash.each do |file_path, value|
found = cache.read_single_entry_from_redis_hash(file_path)
expect(found).to eq(value.to_json)
end
end
end
describe '#clear' do
let(:backend) { double('backend').as_null_object }
......
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