Memoize diffs with path options set separately

This commit is contained in:
Sean McGivern 2016-07-08 10:37:11 +01:00
parent 32e593c663
commit 87aba17ecd
1 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,8 @@ class MergeRequestDiff < ActiveRecord::Base
compare.diffs(options)
end
else
@diffs ||= load_diffs(st_diffs, options)
@diffs ||= {}
@diffs[options[:paths]] ||= load_diffs(st_diffs, options)
end
end