Skip to content
You are reading Codefi Orchestrate development version documentation and some displayed features may not be available in the stable release. You can switch to stable version using the version box at screen bottom.

Use chain proxy cache

Use the chain proxy cache to reduce the amount of calls to the same RPC endpoints. The chain proxy cache is useful if you have multiple tenants and chains pointing to the same RPC endpoints.

Note

The chain proxy forms part of the Orchestrate Gateway API.

The cache covers calls to the following RPC methods:

  • eth_getBlockByNumber
  • eth_getTransactionReceipt

To configure the cache, configure the --proxy-cache-ttl command line option, or set the PROXY_CACHE_TTL environment variable.

For example, the following enables the cache, and sets the time-to-live (TTL) to 10 seconds.

--proxy-cache-ttl=10s
PROXY_CACHE_TTL=10s

Note

The TTL value must be a Golang duration string.

To skip the cache when making requests to the chain proxy, append the X-Cache-Control=no-cache header as follows:

curl -X POST -H "Content-Type: application/json"  -H "X-Cache-Control=no-cache" --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params": ....}' /
ConsenSys has acquired Quorum from J.P. Morgan. Please read the FAQ.
Questions or feedback? You can obtain paid professional support by Consensys at orchestrate@consensys.net