1. A method comprising: constructing a first codeword from a cache tag in a cache and an error correction code corresponding to the cache tag; constructing a second codeword from a search tag and an error correction code corresponding to the search tag; calculating a hamming distance between the first codeword and the second codeword; if the hamming distance is one of less than and equal to a threshold, signaling a cache hit; and if the hamming distance is above the threshold, signaling a cache miss.