title: Retrofit + OkHttp + cache + HTTPS
body: <p>I have problem with Retrofit combine with OkHttp Cache and HTTPS. Simply, it doesn't work. When I switch endpoint to non-https version, everything works.</p>
  
  <p>My Retrofit instance:</p>
  
  <pre><code>File cacheDirectory = new File(App.get().getApplicationContext()
      .getCacheDir().getAbsolutePath(), "HttpCache");
  
  try {
      cache = new Cache(cacheDirectory, 10 * 1024 * 1024);
  } catch (IOException ioe) {
      Log.w(TAG, ioe);
  }
  
  OkHttpClient okHttpClient = new OkHttpClient();
  okHttpClient.setCache(cache);
  
  mInstance = new RestAdapter.Builder()
      .setLogLevel(RestAdapter.LogLevel.HEADERS)
      .setEndpoint("https://....")
      .setClient(new OkClient(okHttpClient))
      .setConverter(new SimpleXMLConverter())
      .setExecutors(Executors.newSingleThreadExecutor(), new MainThreadExecutor())
      .setRequestInterceptor(new RequestInterceptor() {
          @Override
          public void intercept(RequestFacade request) {
              request.addHeader("Cache-Control", "public, max-age=900");
          }
      })
      .build()
      .create(Restu.class);
  </code></pre>
  
  <p>Response correctly contains header <code>**Cache-Control: public, max-age=900**</code>.</p>