Credera interview question

What's the difference between using a database and using cache?