Updated cache functions