add Cache DAO
fix bugs; add transaction support