@@ -187,15 +187,15 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
187
187
188
188
hash := hashRequestURL (r .URL )
189
189
canCache := s .canCacheRequest (r )
190
- s .vlogf ("B U:%q H:%s C:%v" , r .URL , hash , canCache )
190
+ s .vlogf ("rp B U:%q H:%s C:%v" , r .URL , hash , canCache )
191
191
start := time .Now ()
192
192
if canCache {
193
193
// Check for a hit on this object in the memory cache.
194
194
if data , hdr , err := s .cacheLoadMemory (hash ); err == nil {
195
195
s .reqMemoryHit .Add (1 )
196
196
setXCacheInfo (hdr , "hit, memory" , hash )
197
197
writeCachedResponse (w , hdr , data )
198
- s .vlogf ("E H:%s hit mem B:%d (%v elapsed)" , hash , len (data ), time .Since (start ))
198
+ s .vlogf ("rp E H:%s hit mem B:%d (%v elapsed)" , hash , len (data ), time .Since (start ))
199
199
return
200
200
}
201
201
@@ -204,7 +204,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
204
204
s .reqLocalHit .Add (1 )
205
205
setXCacheInfo (hdr , "hit, local" , hash )
206
206
writeCachedResponse (w , hdr , data )
207
- s .vlogf ("E H:%s hit disk B:%d (%v elapsed)" , hash , len (data ), time .Since (start ))
207
+ s .vlogf ("rp E H:%s hit disk B:%d (%v elapsed)" , hash , len (data ), time .Since (start ))
208
208
return
209
209
}
210
210
s .reqLocalMiss .Add (1 )
@@ -217,11 +217,11 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
217
217
}
218
218
setXCacheInfo (hdr , "hit, remote" , hash )
219
219
writeCachedResponse (w , hdr , data )
220
- s .vlogf ("E H:%s hit S3 B:%d (%v elapsed)" , hash , len (data ), time .Since (start ))
220
+ s .vlogf ("rp E H:%s hit S3 B:%d (%v elapsed)" , hash , len (data ), time .Since (start ))
221
221
return
222
222
}
223
223
s .reqFaultMiss .Add (1 )
224
- s .vlogf ("- H:%s miss" , hash )
224
+ s .vlogf ("rp - H:%s miss" , hash )
225
225
}
226
226
227
227
// Reaching here, the object is not already cached locally so we have to
@@ -238,7 +238,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
238
238
// A response we cannot cache at all.
239
239
setXCacheInfo (rsp .Header , "fetch, uncached" , "" )
240
240
s .rspNotCached .Add (1 )
241
- s .vlogf ("E H:%s fetch RC:no (%v elapsed)" , hash , time .Since (start ))
241
+ s .vlogf ("rp E H:%s fetch RC:no (%v elapsed)" , hash , time .Since (start ))
242
242
return nil
243
243
}
244
244
@@ -257,7 +257,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
257
257
s .rspSaveMem .Add (1 )
258
258
259
259
// N.B. Don't persist on disk or in S3.
260
- s .vlogf ("E H:%s fetch RC:mem B:%d (%v elapsed)" , hash , len (body ), time .Since (start ))
260
+ s .vlogf ("rp E H:%s fetch RC:mem B:%d (%v elapsed)" , hash , len (body ), time .Since (start ))
261
261
}
262
262
} else {
263
263
setXCacheInfo (rsp .Header , "fetch, cached" , hash )
@@ -273,7 +273,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
273
273
s .rspSaveBytes .Add (int64 (len (body )))
274
274
s .start (s .cacheStoreS3 (hash , rsp .Header , body ))
275
275
}
276
- s .vlogf ("E H:%s fetch RC:yes B:%d (%v elapsed)" , hash , len (body ), time .Since (start ))
276
+ s .vlogf ("rp E H:%s fetch RC:yes B:%d (%v elapsed)" , hash , len (body ), time .Since (start ))
277
277
}
278
278
}
279
279
return nil
0 commit comments