cache fixes

updated to ensure that hit count for the current element isn't reset when the cache is resized