chainlink-common
chainlink-common copied to clipboard
Cached Contract Reader
The base implementation of ContractReader does not include caching. This struct wraps a ContractReader and provides basic caching strategies such as polling on an interval and caching the result as well as falling-through when a cached value is stale based on a configured value.
Caching is managed per contract/method where params must match exactly on previously requested values. If no cache matches occur, the request falls-through to the wrapped ContractReader.
The functions QueryKey and Bind always fall-through to the wrapped ContractReader.