package Ġcom . an ur ag . news feed app . data . db Ċ Ċ import Ġcom . an ur ag . news feed app . data . News Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Singleton Ċ Ċ @ Singleton Ċ class ĠDisk DataSource Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġnews Feed Dao : ĠNews Feed Dao Ċ ) Ġ{ ĊĊĠĠĠ Ġsuspend Ġfun Ġupdate Cache ( news : ĠList < News >) Ġ{ ĊĠĠĠĠĠĠĠ Ġnews Feed Dao . clear News () ĊĠĠĠĠĠĠĠ Ġnews Feed Dao . save All News ( news ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsuspend Ġfun Ġget News (): ĠList < News > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġnews Feed Dao . getAll News Feed () ĊĠĠĠ Ġ} Ċ }