added cache and log