Adding database caching