ar-io / arns-service

Koa microservice that leverages Warp to support the ArNS Portal and ar.io observers.
https://api.arns.app
GNU Affero General Public License v3.0
19 stars 4 forks source link

PE-5202: add a readthroughpromisecache for contract interactions #79

Closed arielmelendez closed 10 months ago

arielmelendez commented 10 months ago

Mapping times after the retrievals seems to be somewhat non-performant based on log outputs. We should investigate further. Example logs:

debug: Fetching contract interactions {"contractTxId":"-8A6RexFkpfWwuyVO98wzSFZh0d6VJuI-buTJvlwOJQ","method":"GET","path":"/v1/contract/-8A6RexFkpfWwuyVO98wzSFZh0d6VJuI-buTJvlwOJQ/interactions","timestamp":"2023-12-10T18:03:11.187Z","trace":"387b2d"}
debug: Mapping interactions {"contractTxId":"-8A6RexFkpfWwuyVO98wzSFZh0d6VJuI-buTJvlwOJQ","method":"GET","path":"/v1/contract/-8A6RexFkpfWwuyVO98wzSFZh0d6VJuI-buTJvlwOJQ/interactions","timestamp":"2023-12-10T18:03:11.187Z","trace":"387b2d"}
debug: Setting cache-control to max-age=30. {"method":"GET","path":"/v1/contract/-8A6RexFkpfWwuyVO98wzSFZh0d6VJuI-buTJvlwOJQ/interactions","timestamp":"2023-12-10T18:03:18.029Z","trace":"387b2d"}
debug: Completed request. {"method":"GET","path":"/v1/contract/-8A6RexFkpfWwuyVO98wzSFZh0d6VJuI-buTJvlwOJQ/interactions","responseTime":"6844ms","timestamp":"2023-12-10T18:03:18.030Z","trace":"387b2d"}