Added tests and fixed issue with stale cache values for same key
More tests