swift - When should we clear Core Data cache entity? -
i using code in tutorial http://www.raywenderlich.com/76735/using-nsurlprotocol-swift in tutorial code caching every single request. my question when , how can clear entity of caching (core data)? or dont need clear caching entity? caching entity entity save data requested nsconnection. if need clear cache in core data how can choose data stay , others deleted. for example , making news app. every vc has label such title, date, category , uiwebview. , when app closed want delete caching links except "saved news". "saved news" category users choose tapping button "plus". i thinking create new column named "istosave". so, when user taps button save. need parse content text , pull out links (src=) , in coredata set column "istosave "to true. when app closed delete links column "istosave" = false so shortly: practice clear entity "cacheurls" , if yes how can clear urls selection ? here code: import ...