Updated imageCache with self contained db