Lines Matching refs:request
89 // Get a request from the cache triage queue, blocking until
91 final Request request = mCacheQueue.take();
92 request.addMarker("cache-queue-take");
94 // If the request has been canceled, don't bother dispatching it.
95 if (request.isCanceled()) {
96 request.finish("cache-discard-canceled");
101 Cache.Entry entry = mCache.get(request.getCacheKey());
103 request.addMarker("cache-miss");
105 mNetworkQueue.put(request);
111 request.addMarker("cache-hit-expired");
112 request.setCacheEntry(entry);
113 mNetworkQueue.put(request);
117 // We have a cache hit; parse its data for delivery back to the request.
118 request.addMarker("cache-hit");
119 Response<?> response = request.parseNetworkResponse(
121 request.addMarker("cache-hit-parsed");
125 mDelivery.postResponse(request, response);
128 // but we need to also send the request to the network for
130 request.addMarker("cache-hit-refresh-needed");
131 request.setCacheEntry(entry);
137 // the delivery then forward the request along to the network.
138 mDelivery.postResponse(request, response, new Runnable() {
142 mNetworkQueue.put(request);