MCPcopy Create free account
hub / github.com/apache/trafficserver / load_buffer_cache_data

Function load_buffer_cache_data

example/plugins/c-api/protocol/TxnSM.cc:336–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334}
335
336static void
337load_buffer_cache_data(TxnSM *txn_sm)
338{
339 /* transfer the data from the cache buffer (which must
340 fully be consumed on a VCONN_READY event, to the
341 server response buffer */
342 int rdr_avail = TSIOBufferReaderAvail(txn_sm->q_cache_read_buffer_reader);
343
344 Dbg(dbg_ctl, "entering buffer_cache_data");
345 Dbg(dbg_ctl, "loading %d bytes to buffer reader", rdr_avail);
346
347 TSAssert(rdr_avail > 0);
348
349 TSIOBufferCopy(txn_sm->q_client_response_buffer, /* (cache response buffer) */
350 txn_sm->q_cache_read_buffer_reader, /* (transient buffer) */
351 rdr_avail, 0);
352
353 TSIOBufferReaderConsume(txn_sm->q_cache_read_buffer_reader, rdr_avail);
354}
355
356/* If the document is fully read out of the cache, close the
357 cache read_vc, send the document to the client. Otherwise,

Callers 1

Calls 3

TSIOBufferReaderAvailFunction · 0.85
TSIOBufferCopyFunction · 0.85
TSIOBufferReaderConsumeFunction · 0.50

Tested by

no test coverage detected