cache results in DB