title: iOS 5 does not allow to store downloaded data in Documents directory?
body: <p>I have made an application for my client by keeping target iOS as 4.<br>
  But since the application still not submitted to Apple store, my client is planning to upgrade it for iOS 5.0.  </p>
  
  <p>For this I read the <a href="https://developer.apple.com/icloud/documentation/data-storage/" rel="noreferrer">guideline from Apple</a> and found that "Only user-generated data or that cannot otherwise be recreated by your application, should be stored in the /Documents directory and rest should be stored to /Library/Caches directory" </p>
  
  <p>In my application, I am using server model of in-app purchase for non-consumable product. For this I am storing all my downloaded data (which are basically books or magazines) to Documents directory. The Database is also present in the same directory which contains the details about the downloaded products.  </p>
  
  <p>My question is,<br>
  1. Should I have to change my code to store the downloaded data to Library/Caches directory instead of to the Documents directory?<br>
  2. Where should my database file be placed (to Documents or Caches)?  </p>
  
  <p>If I put it products in the Caches then I have to change the logic of retrieval also, since it is considered that if record is present in database, there is no need change the existence of the file and it directly opens it when user clicks on the magazine.  </p>
  
  <p>Kindly guide me on this issue.<br>
  Thanks in advance.</p>
  
  <p><strong>UPDATED:</strong><br>
  I am updating this for those who are still not sure about this problem.<br>
  Using the guideline of accepted answer, I have implemented this in 2 of my applications and submitted them to Apple Store. Both were approved in review.<br>
  This may promote that the solution suggested in the accepted answer is correct.  </p>