added cache functions