Updated cache functions.