added cache and nocache functions