title: AFNetworking lib not loading data from cache in offline mode
body: <p>I am developing a content reading app in which some data is displayed in a tale view and respective detail views.</p>
  
  <p>Now I have already completed the app but there is a small bug.</p>
  
  <p>I am using AFNetworking library for online data load and offline caching.</p>
  
  <p>I have defined caching policy as described by following code.</p>
  
  <pre><code>Reachability *reach = [Reachability reachabilityWithHostname:@"google.com"];
  
  if ([reach isReachable])
  {
      // Reachable      
      request = [NSMutableURLRequest requestWithURL:url
                                        cachePolicy:NSURLRequestReloadIgnoringLocalCacheData
                                    timeoutInterval:60.0];        
  }
  else
  {
      request = [NSMutableURLRequest requestWithURL:url
                                        cachePolicy:NSURLRequestReturnCacheDataDontLoad
                                    timeoutInterval:60.0];
  }
  </code></pre>
  
  <p>But I am having a small problem that if I load some data online and then turn off the internet connection and close the app. 
  And afterwords if I restart the app again in offline mode, the cached data should load but it is not happening. </p>
  
  <p>I also have tried changing the caching policies as defined in the following link:
  <a href="http://blog.originate.com/blog/2014/02/20/afimagecache-vs-nsurlcache/" rel="nofollow">http://blog.originate.com/blog/2014/02/20/afimagecache-vs-nsurlcache/</a></p>
  
  <p><br> app deployment target : iOS 6.0
  <br> devices : universal
  <br> xcode version : 6.1
  <br> AFNetworking lib version : 2.0
  <br> </p>
  
  <p>Any suggestion is appreciated, thanks in advanced</p>