List of usage examples for com.squareup.okhttp Cache flush
public void flush() throws IOException
From source file:de.dev.eth0.rssreader.app.http.HttpLoaderImpl.java
License:Apache License
/** * Call this to reset the cache-size//from www . jav a2 s.co m * * @param context */ public static void updateCacheSize(Context context) { try { HttpLoaderImpl fl = getInstance(context); Cache cache = fl.client.getCache(); if (cache != null) { cache.flush(); cache.close(); cache.delete(); } fl.client.setCache(getCache(context)); } catch (IOException ex) { Timber.w(ex, "Could not update Cachesize"); } }