Skip to content

feat: add TTL cache to GET /account/:id/trustlines#455

Open
Promzy204-bad wants to merge 1 commit into
stellarkit-lab-devtools:mainfrom
Promzy204-bad:feat/trustlines-cache
Open

feat: add TTL cache to GET /account/:id/trustlines#455
Promzy204-bad wants to merge 1 commit into
stellarkit-lab-devtools:mainfrom
Promzy204-bad:feat/trustlines-cache

Conversation

@Promzy204-bad

Copy link
Copy Markdown
  • Cache responses per account ID using key trustlines:
  • Return X-Cache: HIT or MISS header on every response
  • Support ?fresh=true to bypass the cache
  • Skip cache read and write for filtered ?assetCode requests
  • Add cacheTTL.trustlines reading CACHE_TTL_TRUSTLINES_MS (default 15 s)
  • Update .env.example with CACHE_TTL_TRUSTLINES_MS=15000
  • Add cache integration tests and flush cache in trustline unit tests

Description

Linked Issue

Closes #

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing Notes

Checklist

  • I have updated the documentation accordingly.
  • My changes generate no new warnings.
  • I have performed a self-review of my own code.

closes #330

- Cache responses per account ID using key trustlines:<id>
- Return X-Cache: HIT or MISS header on every response
- Support ?fresh=true to bypass the cache
- Skip cache read and write for filtered ?assetCode requests
- Add cacheTTL.trustlines reading CACHE_TTL_TRUSTLINES_MS (default 15 s)
- Update .env.example with CACHE_TTL_TRUSTLINES_MS=15000
- Add cache integration tests and flush cache in trustline unit tests
@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Promzy204-bad 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

@Sulex45

Sulex45 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Resolve conflicts

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.

Performance & Caching | Add cache TTL to GET /account/:id/trustlines responses

2 participants