The same cache key is being set for varying blockheights, causing the read through cache to return incorrect interactions when a new request with a different blockHeight is created before the cache has expired.
CC @arielmelendez
Logs before:
Reading through to wallet interactions for contract... {"blockHeightFilter":1321450,"cacheKey":"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U-this.blockHeight","contractTxId":"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U","method":"GET","path":"/v1/contract/bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U/interactions","timestamp":"2023-12-13T08:48:13.463Z","trace":"ecd1e3"}
Reading through to wallet interactions for contract... {"blockHeightFilter":1321450,"cacheKey":"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U-1321450","contractTxId":"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U","method":"GET","path":"/v1/contract/bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U/interactions","timestamp":"2023-12-13T08:57:46.165Z","trace":"b2ea0e"}
The same cache key is being set for varying blockheights, causing the read through cache to return incorrect interactions when a new request with a different blockHeight is created before the cache has expired.
CC @arielmelendez
Logs before:
Specifically:
"cacheKey":"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U-this.blockHeight"
Logs after:
Updated:
"cacheKey":"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U-1321450"