Skip to content

chore(stellar): use shared cache utils - #290

Open
taran-a wants to merge 1 commit into
feat/move-cache-into-shared-libfrom
chore/stellar-use-shared-cache-utils
Open

chore(stellar): use shared cache utils#290
taran-a wants to merge 1 commit into
feat/move-cache-into-shared-libfrom
chore/stellar-use-shared-cache-utils

Conversation

@taran-a

@taran-a taran-a commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Explanation

Migrates the Stellar snap to the shared caching utilities in @metamask/snap-networks-utils and removes its local copies (src/services/cache/)

Behavioral changes:

  • useCacheUntil consults the cache when the in-memory expiry map is empty (expiresAt === undefined || now < expiresAt) instead of requiring the map to be populated — Tron's fix, adopted by the shared version. Latent for Stellar today (its InMemoryCache survives nothing), but correct if a persisted cache is ever wired.
  • Error logging: both wrappers take an optional logger (default silent); call sites pass the snap logger to preserve current output. The stray 'useCache' prefix Stellar's local useCacheUntil applied is gone.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@taran-a
taran-a requested review from a team as code owners September 8, 2026 14:19
@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

@taran-a taran-a changed the title chore: stellar use shared cache utils chore(stellar): use shared cache utils Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant