Added compare-set logic to search cache.