How about adding:Whether the object was compressed in RAM, If it was from disk, the number of milliseconds to read the first byte in.But going by the name of the variable sounds like you don't want to get timings. pushkar
On Tuesday, September 1, 2015 3:43 PM, Sudheer Vinukonda <sudhe...@yahoo-inc.com.INVALID> wrote: [resending with (hopefully) better formatting] On Tuesday, September 1, 2015 2:54 PM, Sudheer Vinukonda <sudhe...@yahoo-inc.com> wrote: I'd like to add a new API TSHttpTxnCacheStateGet() to be able to get more insight into cache operations (e.g read_while_write, open read tries, open write tries, cache volume used etc) on a given Txn. Below's the proposal with the info I'd like the new API return along with the API signature. I've opened TS-3881 to track this. Please provide comments/suggestions. +typedef enum { + TS_CACHE_TXN_STATE_HIT_RAM, + TS_CACHE_TXN_STATE_READ_WHILE_WRITER, + TS_CACHE_TXN_STATE_OPEN_READ_TRIES, + TS_CACHE_TXN_STATE_OPEN_WRITE_TRIES, + TS_CACHE_TXN_STATE_CACHE_VOLUME, + TS_CACHE_TXN_STATE_LAST_ENTRY +} TSCacheTxnStateKey; + +/* Get Cache Lookup state, useful for understanding how a lookup was performed */ +/** + Return the particular cache lookup info requested. + + @param txnp the transaction pointer + @param key the requested cache lookup info. + @param TSMgmtInt a pointer to a integer where we will store the metric value + + @return @c TS_SUCCESS if the metric is supported, TS_ERROR otherwise + +*/ +tsapi TSReturnCode TSHttpTxnCacheStateGet(TSHttpTxn txnp, TSCacheStateKey key, TSMgmtInt *value); + Thanks, Sudheer