Use match() in matchOrNull() in MatchCache

These two methods were almost the same, so reduce the code by sharing
more while bringing their implementations inline with each other. This
results in no longer putting a null into the cache when it already is
null.

Change-Id: I6182e833e88b4a319840d56cc09557acb1ba6035
1 file changed