title: Check if Volley gets results from cache or over network
body: <p>How can I check whether Volley gets the results of a JsonObjectRequest from the cache or from the network?</p>
  
  <p>I need to show a progress dialog when it needs a network connection but not when the results are quickly received from the cache.</p>
  
  <p>my request looks something like this</p>
  
  <pre><code>volleyQueue = Volley.newRequestQueue(this);
  JsonObjectRequest jr = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener&lt;JSONObject&gt;(){...stuff}, new Response.ErrorListener(){...errorstuff});
  jr.setShouldCache(true);
  volleyQueue.add(jr);
  </code></pre>