title: Database not updated with 3g but works fine with Wi-Fi
body: <p>I am suppose to update the online database. Ive realise that when my network is connected to the Wi-Fi, the database gets updated when I press the refresh button, however when my network is connected to the 3g, the database may or may not gets updated. If it gets updated, it would take a long time, even if i pressed the refresh button.. I think there is problem with the caching but Im not sure how to put the caching into my code.. This is my code:</p>
  
  <pre><code>- (void)downloadAtURLString:(NSString *)urlString
  {
      NSMutableData *data = [[NSMutableData alloc] init];
      self.activeDownload = data;
      [data release];
      // encode the urlString with percent escapes
      NSString *urlStr = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
      NSURL *url = [[NSURL alloc] initWithString:urlStr];
      NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
      NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
      self.urlConnection = conn;
      [conn release], [request release], [url release];
   }
  </code></pre>
  
  <p>I tried using this code: </p>
  
  <pre><code>NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReturnCacheDataElseLoad timeoutInterval:30.0];
  </code></pre>
  
  <p>I received a warning.. is the cachePolicy correct??</p>