Skip to content

Feat/issue 142 - #258

Open
connelevalsam wants to merge 3 commits into
trustflow-protocol:mainfrom
connelevalsam:feat/issue-142
Open

Feat/issue 142#258
connelevalsam wants to merge 3 commits into
trustflow-protocol:mainfrom
connelevalsam:feat/issue-142

Conversation

@connelevalsam

Copy link
Copy Markdown
Contributor

closes #142

Summary

Implemented opt-in TTL caching for TrustFlowClient.getBalance.

  • Added balanceCache: { ttlMs? } configuration; caching is off by default and uses a 5-second TTL when enabled.
  • Added { skipCache: true } to force a fresh Horizon lookup.
  • Added and exported SimpleCache, with expiry handling.
  • Updated Typedoc comments and added Jest coverage for cache hits, expiry, forced refresh, and no exposure of balance data outside the API result.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@connelevalsam Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add TTL-based caching to TrustFlowClient.getBalance to reduce redundant Horizon calls

1 participant