added cache for db