title: TTURLCache to cache my image and data
body: <p>I used three20's photo gallery in my app and it worked really well and looked neat and pretty. And basically I don't need to worry about all the fetch-photos-from-the-server thing since three20 has fetched and managed and cached the data for me, all of which are done behind the scene.</p>
  
  <p>That's when I started to notice this magic caching mechanism implemented in three20, called <strong>TTURLCache</strong>. In its header file I find the following interface methods:</p>
  
  <pre><code>/**
   * Stores a data on disk.
   */
  - (void)storeData:(NSData*)data forURL:(NSString*)URL; //method 1
  - (void)storeData:(NSData*)data forKey:(NSString*)key;
  
  /**
   * Stores an image in the memory cache.
   */
  - (void)storeImage:(UIImage*)image forURL:(NSString*)URL; //method 2
  
  /**
   * Stores an etag value in the etag cache.
   */
  - (void)storeEtag:(NSString*)etag forKey:(NSString*)key; //method 3
  </code></pre>
  
  <p>My questions:</p>
  
  <ol>
  <li>Method 1 and method 2 in the above code: are they only capable of storing data, or are they capable of both fetching and storing?</li>
  <li>What is an etag in method 3?</li>
  <li>Method 1 says it will store the data on disk, while method 2 says it will store the image in memory. If I use method 2 to store an image, will it get lost once I kill and restart my app?</li>
  </ol>
  
  <p>Thanks a lot in advance.</p>