Determining an error-correcting code (ECC) for a cache entry based at
least on the data stored in the cache entry and the memory address at which the
data is permanently stored is disclosed. A cache entry for a desired memory address
is retrieved. The cache entry includes data and a stored ECC based on the data
and a memory address. An ECC is determined based at least on the data of the cache
entry and the desired memory address. If the ECC at least based on the cache entry
data and the desired memory address equals the stored ECC, then the cache entry
caches the desired memory address without error.