Lines Matching refs:request
88 // Get a request from the cache triage queue, blocking until
90 final Request<?> request = mCacheQueue.take();
91 request.addMarker("cache-queue-take");
93 // If the request has been canceled, don't bother dispatching it.
94 if (request.isCanceled()) {
95 request.finish("cache-discard-canceled");
100 Cache.Entry entry = mCache.get(request.getCacheKey());
102 request.addMarker("cache-miss");
104 mNetworkQueue.put(request);
110 request.addMarker("cache-hit-expired");
111 request.setCacheEntry(entry);
112 mNetworkQueue.put(request);
116 // We have a cache hit; parse its data for delivery back to the request.
117 request.addMarker("cache-hit");
118 Response<?> response = request.parseNetworkResponse(
120 request.addMarker("cache-hit-parsed");
124 mDelivery.postResponse(request, response);
127 // but we need to also send the request to the network for
129 request.addMarker("cache-hit-refresh-needed");
130 request.setCacheEntry(entry);
136 // the delivery then forward the request along to the network.
137 mDelivery.postResponse(request, response, new Runnable() {
141 mNetworkQueue.put(request);