title: iOS - Best practice to save Images locally - NSCache vs Save in Document Directory
body: <p>I'm developing an app that similar to Instagram feed (tableviews with cells that contain images and some labels).</p>
  
  <p>For all the data I'm getting from the database, I'm using Data Task (because it doesn't take much to receive them), but for the images (which their url's I get with the Data request), I need to save locally for future use (improve user experience).</p>
  
  <p>My logic is the following:
  Save in NSCache or in Document Directory, the images inside folder with the date they been downloaded(create it once and append all other images if needed) (<em>I'm deleting every folder which is not from the recent 7 days</em>), and then for the TableView, just load if from there, so the tableview will scroll smoothly and won't load the url directly from its delegate method.
  So where is the better place to store them according to my needs, <strong>NSCache or Document Directory</strong>.</p>
  
  <p>Looking forward to hearing your suggestions, Thank you!</p>