chainlink-common icon indicating copy to clipboard operation
chainlink-common copied to clipboard

Cached Contract Reader

Open EasterTheBunny opened this issue 1 year ago • 0 comments

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.

EasterTheBunny avatar May 31 '24 19:05 EasterTheBunny