Fix for the cache inconsistency

Untested. This change should allow the cache to be updated with the most current inserted value.
Merge pull request #5 from Tamschi/patch-1

Fix for the cache inconsistency