updated cache functions