title: MKNetworkKit caching not working
body: <p>Am facing thi really unusual problem with MKNetworkKit caching. In simple word's the problem is that "It is not working"..! </p>
  
  <p>I have created a simple test project which has the problem. The project does nothing, but just   makes a simple GET request to <a href="http://where.yahooapis.com/" rel="nofollow">http://where.yahooapis.com</a>/ to fetch the the address or information for a city name. The response, is supposed to be chached the first time you run it and from second time the completion handler will be called twice, once with cached response and again with the fetched response. as you can see below, which is taken from <a href="http://blog.mugunthkumar.com/coding/ios-tutorial-image-cache-and-loading-thumbnails-using-mknetworkkit/" rel="nofollow">http://blog.mugunthkumar.com/coding/ios-tutorial-image-cache-and-loading-thumbnails-using-mknetworkkit/</a></p>
  
  <blockquote>
    <p>MKNetworkKit calls the SAME completion handler with cached data if you
    are making the call for the second time. When the network connectivity
    is proper, MKNetworkKit calls your completion handler twice. First
    with the cached data and again after fetching the latest data from
    server.</p>
  </blockquote>
  
  <p>Well, the unusual thing is, I run the app, it didn't cache, I again ran the app, it again didn't cache,  after some random runs suddenly the caching started working. I deleted the app and run it again, the cache wont work till some random runs and problem repeats..!</p>
  
  <p>FYI, I have used the latest MKNetworkkit downloaded from <a href="https://github.com/MugunthKumar/MKNetworkKit" rel="nofollow">GIT</a>. </p>
  
  <p>Am not sure whether it is some problem with my code, or a bug with MKNetworkKit itself. So please go through with the code, and let me know if its me or the MKNetworkKit that's causing this problem.</p>
  
  <p><strong>Here is the link to download the sample project  [https://www.box.com/s/tsfw3z0avpti051xbyhv]</strong><a href="https://www.box.com/s/tsfw3z0avpti051xbyhv" rel="nofollow">4</a></p>
  
  <p>Thank, in advance.</p>