Fix for the cache inconsistency

Untested. This change should allow the cache to be updated with the most current inserted value.