Example usage for com.squareup.okhttp Cache evictAll

List of usage examples for com.squareup.okhttp Cache evictAll

Introduction

In this page you can find the example usage for com.squareup.okhttp Cache evictAll.

Prototype

public void evictAll() throws IOException 

Source Link

Document

Deletes all values stored in the cache.

Usage

From source file:com.anony.okhttp.sample.RewriteResponseCacheControl.java

License:Apache License

public RewriteResponseCacheControl(File cacheDirectory) throws Exception {
    Cache cache = new Cache(cacheDirectory, 1024 * 1024);
    cache.evictAll();

    client = new OkHttpClient();
    client.setCache(cache);/*ww  w.j av a  2s .c o  m*/
}