---
name: "TSHttpTxnInfoIntGet"
section: "3ts"
platform: "linux"
package: "trafficserver-dev"
version: "9.2.5+ds-0+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/TSHttpTxnInfoIntGet"
---

# TSHttpTxnInfoIntGet(3ts)

TSHttpTxnInfoIntGet API function

## NAME

TSHttpTxnInfoIntGet - TSHttpTxnInfoIntGet API function

## SYNOPSIS

```
#include <ts/ts.h>
```

- ***TSReturnCode* TSHttpTxnInfoIntGet(*TSHttpTxn* txnp, *TSHttpTxnInfoKey* key, *TSMgmtInt* \*value)**

  ## DESCRIPTION

*TSHttpTxnInfoIntGet()* returns arbitrary integer-typed info about a transaction as defined in *TSHttpTxnInfoKey*. The API will be part of a generic API umbrella that can support returning arbitrary info about a transaction using custom log tags. It works on multiple hooks depending on the requested info. For example, cache related info may be available only at or after *TS\_HTTP\_CACHE\_LOOKUP\_COMPLETE\_HOOK* hook.

The *TSHttpTxnInfoKey* currently supports the below integer-based info about a transaction

- **enum TSHttpTxnInfoKey**

  - **enumerator TS\_TXN\_INFO\_CACHE\_HIT\_RAM**

    This info is available at or after *TS\_HTTP\_CACHE\_LOOKUP\_COMPLETE\_HOOK* hook. A value of **1** indicates that the response is returned from RAM cache. A value of **0** indicates otherwise.

  - **enumerator TS\_TXN\_INFO\_CACHE\_COMPRESSED\_IN\_RAM**

    This info is available at or after *TS\_HTTP\_CACHE\_LOOKUP\_COMPLETE\_HOOK* hook. A value of 1 indicates that the response is returned from RAM cache and is compressed. A value of 0 indicates otherwise.

  - **enumerator TS\_TXN\_INFO\_CACHE\_HIT\_RWW**

    This info is available at or after *TS\_HTTP\_CACHE\_LOOKUP\_COMPLETE\_HOOK* hook. A value of 1 indicates that the response is returned via Read-While-Writer functionality. A value of 0 indicates otherwise.

  - **enumerator TS\_TXN\_INFO\_CACHE\_OPEN\_READ\_TRIES**

    This info is available at or after *TS\_HTTP\_CACHE\_LOOKUP\_COMPLETE\_HOOK* hook. The value indicates the number of cache open read reattempts made by the transaction on cache open read failure.

  - **enumerator TS\_TXN\_INFO\_CACHE\_OPEN\_WRITE\_TRIES**

    This info is available at or after *TS\_HTTP\_CACHE\_LOOKUP\_COMPLETE\_HOOK* hook. The value indicates the number of cache open write reattempts made by the transaction on cache open write failure.

  - **enumerator TS\_TXN\_INFO\_CACHE\_VOLUME**

    This info is available at or after *TS\_HTTP\_CACHE\_LOOKUP\_COMPLETE\_HOOK* hook. The value indicates the cache volume ID used for the cache object associated with the transaction.

## RETURN VALUES

The API returns *TS\_SUCCESS*, if the requested info is supported, *TS\_ERROR* otherwise.

## COPYRIGHT

2026, dev@trafficserver.apache.org
