Tested and debugged addEntry function in cache