Skip to content

[codex] Hash investor lock cache keys#547

Open
MyouzzZ wants to merge 1 commit into
Liquifact:mainfrom
MyouzzZ:codex/investor-lock-cache-key-519
Open

[codex] Hash investor lock cache keys#547
MyouzzZ wants to merge 1 commit into
Liquifact:mainfrom
MyouzzZ:codex/investor-lock-cache-key-519

Conversation

@MyouzzZ

@MyouzzZ MyouzzZ commented Jul 3, 2026

Copy link
Copy Markdown

Closes #519

Summary

  • hash investor-lock principal scope and funder query components before storing them in cache keys
  • normalize investor-lock list query params so equivalent requests share a key while tenant, pagination, invoice, and funder inputs still isolate responses
  • add regression coverage for same-invoice cross-funder cache misses and repeated same-funder hits
  • document the updated investor-lock cache key formats
  • restore logger/metrics support needed for the cache middleware tests and CI changed-file lint

Tests

  • npm test -- --silent src/middleware/cache.test.js
  • npx eslint src/middleware/cache.js src/middleware/cache.test.js src/logger.js src/metrics.js
  • npx jest --no-coverage --forceExit tests/escrow.derived.test.js
  • node --check src/index.js

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 caller-aware throttling-safe escrow read caching to GET /api/investor/locks/:invoiceId

1 participant