explorer icon indicating copy to clipboard operation
explorer copied to clipboard

Read-only calls seem to be cached

Open obycode opened this issue 1 year ago • 0 comments

Describe the bug When calling a read-only function multiple times, it seems that the function is only called the first time, then later calls simple return the cached result. This is misleading and confusing to users.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://explorer.hiro.so/txid/0x388c45798274d14b936794174a84a375499f91eac988ae3cea4bf25bfbf92707?chain=testnet
  2. Click on 'Available functions'
  3. Click on 'foo'
  4. Enter 999999 as the height and click 'Call function'
  5. See expected result of none
  6. Click 'Cancel'
  7. Click 'foo' again
  8. Enter a real block height, e.g. 40000 and click 'Call function'
  9. See incorrect result, none
  10. Refresh the page and call again with 40000 and see different result, (some u1726971846)

Expected behavior The read-only function should be called each time, unless the same input is passes, in which case, the result could be cached.

obycode avatar Sep 24 '24 13:09 obycode