Configuring database caches