mirror of
https://github.com/status-im/eth-rpc-proxy.git
synced 2026-08-31 03:31:14 +00:00
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
# TTL defaults for different cache types and networks
|
|
ttl_defaults:
|
|
# Default TTL values
|
|
default:
|
|
permanent: 24h
|
|
short: 5s
|
|
minimal: 0s
|
|
|
|
# Ethereum mainnet specific TTLs
|
|
ethereum:mainnet:
|
|
permanent: 24h
|
|
short: 10s
|
|
minimal: 0s
|
|
|
|
# Polygon specific TTLs
|
|
polygon:mainnet:
|
|
permanent: 12h
|
|
short: 5s
|
|
minimal: 0s
|
|
|
|
skip_null_cache:
|
|
- eth_getTransactionReceipt
|
|
- eth_getTransactionByHash
|
|
- eth_getBlockByHash
|
|
- eth_getBlockByNumber
|
|
|
|
# Cache rules mapping JSON-RPC methods to cache types
|
|
cache_rules:
|
|
# Permanent cache - blockchain data that never changes
|
|
eth_getBlockByHash: "permanent"
|
|
eth_getBlockByNumber: "permanent"
|
|
eth_getTransactionByHash: "permanent"
|
|
eth_getTransactionReceipt: "permanent"
|
|
eth_getLogs: "permanent"
|
|
|
|
# Short cache - data that changes frequently but can be cached briefly
|
|
eth_blockNumber: "short"
|
|
eth_gasPrice: "short"
|
|
eth_getBalance: "short"
|
|
eth_getCode: "short"
|
|
eth_getStorageAt: "short"
|
|
eth_getTransactionCount: "short"
|
|
eth_call: "short"
|
|
eth_estimateGas: "short"
|
|
|
|
# Minimal/no cache - real-time data
|
|
eth_sendRawTransaction: "minimal"
|
|
eth_sendTransaction: "minimal"
|
|
|
|
# Web3 methods
|
|
web3_clientVersion: "permanent"
|
|
web3_sha3: "permanent"
|
|
|
|
# Net methods
|
|
net_version: "permanent"
|
|
net_listening: "short"
|
|
net_peerCount: "short"
|
|
|