title: Best way to Cache JSON from API in SWIFT?
body: <p>I need to cache json data from API in swift. 
  So I researched a Lot &amp; get to this <a href="https://stackoverflow.com/questions/28418035/synchronizing-remote-json-data-to-local-cache-storage-in-ios-swift">Post</a>. </p>
  
  <p>I tried to implement the Option 1 in my App. But the Custom manager always returned nil. I don't know why?</p>
  
  <p>After that I got <a href="https://github.com/aschuch/AwesomeCache" rel="noreferrer">AwesomeCache</a>. It says that it an do Awesome API Caching.
  But I don't know how to implement this?
  I referred this <a href="https://github.com/aschuch/AwesomeCache/issues/24" rel="noreferrer">Issue</a>. Still I can't figure it Out.</p>
  
  <p>This is how my Current implementation Looks without Cache:</p>
  
  <pre><code>Alamofire.request(.GET, "http://api.androidhive.info/volley/person_array.json")
  
      .responseJSON { (_, _, data, _) in
          let json = JSON(data!)
          let catCount = json.count
          for index in 0...catCount-1 {
              let name = json[index]["name"].string
              println(name)
           }
  </code></pre>
  
  <p>Please suggest me the Best way to Cache JSON from API ?</p>
  
  <p>Thanks in Advance!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>These are my requirements</p>
  
  <ol>
  <li><p>Fetch the JSON from the API &amp; Parse the JSON data. These can be done with the help of Alamofire &amp; SwiftyJSON</p></li>
  <li><p>I will populate the parsed data in the Table View. It works when the user is in Online. </p></li>
  </ol>
  
  <p>But I want to show the data in the Table when the user is in offline too. </p>
  
  <p>So I need to save the Parsed data or the JSON data in my cache &amp; I need to refresh or expire the cache within a week or days.</p>
  
  <p>I don't prefer to store the JSON in my disk because it will be updated. </p>
  
  <p>Please suggest me the Best way to achieve this... </p>