@Override protected void onStop() { HttpResponseCache cache = HttpResponseCache.getInstalled(); if (cache != null) { cache.flush(); } super.onStop(); }
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) @Override protected void onStop() { super.onStop(); HttpResponseCache cache = HttpResponseCache.getInstalled(); if (cache != null) { cache.flush(); } }
private static void flushHttpCache() { HttpResponseCache cache = HttpResponseCache.getInstalled(); if (cache != null) { cache.flush(); } }