FileDocCategorySizeDatePackage
ClearCacheRequest.javaAPI DocAndroid 5.1 API2041Thu Mar 12 22:22:56 GMT 2015com.android.volley.toolbox

ClearCacheRequest

public class ClearCacheRequest extends com.android.volley.Request
A synthetic request used for clearing the cache.

Fields Summary
private final com.android.volley.Cache
mCache
private final Runnable
mCallback
Constructors Summary
public ClearCacheRequest(com.android.volley.Cache cache, Runnable callback)
Creates a synthetic request for clearing the cache.

param
cache Cache to clear
param
callback Callback to make on the main thread once the cache is clear, or null for none

        super(Method.GET, null, null);
        mCache = cache;
        mCallback = callback;
    
Methods Summary
protected voiddeliverResponse(java.lang.Object response)

    
public PrioritygetPriority()

        return Priority.IMMEDIATE;
    
public booleanisCanceled()

        // This is a little bit of a hack, but hey, why not.
        mCache.clear();
        if (mCallback != null) {
            Handler handler = new Handler(Looper.getMainLooper());
            handler.postAtFrontOfQueue(mCallback);
        }
        return true;
    
protected com.android.volley.ResponseparseNetworkResponse(com.android.volley.NetworkResponse response)

        return null;