Cache database on start.