Lines Matching refs:request
86 // Get a request from the cache triage queue, blocking until
88 final Request request = mCacheQueue.take();
89 request.addMarker("cache-queue-take");
91 // If the request has been canceled, don't bother dispatching it.
92 if (request.isCanceled()) {
93 request.finish("cache-discard-canceled");
98 Cache.Entry entry = mCache.get(request.getCacheKey());
100 request.addMarker("cache-miss");
102 mNetworkQueue.put(request);
108 request.addMarker("cache-hit-expired");
109 request.setCacheEntry(entry);
110 mNetworkQueue.put(request);
114 // We have a cache hit; parse its data for delivery back to the request.
115 request.addMarker("cache-hit");
116 Response<?> response = request.parseNetworkResponse(
118 request.addMarker("cache-hit-parsed");
122 mDelivery.postResponse(request, response);
125 // but we need to also send the request to the network for
127 request.addMarker("cache-hit-refresh-needed");
128 request.setCacheEntry(entry);
134 // the delivery then forward the request along to the network.
135 mDelivery.postResponse(request, response, new Runnable() {
139 mNetworkQueue.put(request);