title: flush() and evictAll() not working for okhttp3 cache
body: <p>I am accessing TestRail's API which has a 180 Req/min rate limit,</p>
  <ol>
  <li>I am using okHttpClient for accessing it</li>
  <li>To keep a count of a count of requests I am using okhttp cache</li>
  <li>After every 180 Requests, I want to reset the cache but cache.flush() and cache.evictAll() both are not working</li>
  </ol>
  <pre><code>@Bean
  @Named(&quot;testRail&quot;)
  fun createClient(appConfig: AppConfig): OkHttpClient = OkHttpClient
    .Builder()
    .cache(Cache(File(&quot;http_cache&quot;),100*1024*1024))
    .readTimeout(Duration.ofHours(1)).build()
  </code></pre>
  <p>I have tried these methods to clear the cache but nothing seems to be working,</p>
  <pre><code>println(&quot;Client Request original: ${httpClient.cache?.requestCount()}&quot;) //prints n
  httpClient.cache?.evictAll()
  println(&quot;Client Request after evict: ${httpClient.cache?.requestCount()}&quot;) //prints n
  httpClient.cache?.flush()
  println(&quot;Client Request after flush: ${httpClient.cache?.requestCount()}&quot;) //prints n
  httpClient.cache?.delete()
  httpClient.cache?.initialize()
  println(&quot;Client Request after deleting and initializing: ${httpClient.cache?.requestCount()}&quot;) //prints n
  </code></pre>
  <p>I tried adding an interceptor too, but that didn't work too or I am doing something wrong here:</p>
  <pre><code>@Bean
  @Named(&quot;testRail&quot;)
  fun createClient(appConfig: AppConfig): OkHttpClient = OkHttpClient
    .Builder()
    .cache(Cache(File(&quot;http_cache&quot;),100*1024*1024))
    .readTimeout(Duration.ofHours(1)).build()
    .addInterceptor(provideCacheInterceptor(1))
  
  private fun provideCacheInterceptor(maxMinutes: Int): Interceptor {
      return Interceptor { chain -&gt;
        val response: Response = chain.proceed(chain.request())
        val cacheControl: CacheControl = CacheControl.Builder()
          .maxAge(maxMinutes, TimeUnit.MINUTES)
          .build()
        response.newBuilder()
          .header(CACHE_CONTROL, cacheControl.toString())
          .build()
      }
    }
  </code></pre>
  <p>Please let me know if there is a way to clear this</p>