You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User Story
As an API consumer, I need faster response times for frequently accessed, relatively static data endpoints (currencies, institutions, and public key), so that the application performs more efficiently and reduces unnecessary load on our backend services.
Acceptance Criteria
GIVEN a request is made to /currencies endpoint WHEN the cache is empty or expired THEN fetch from source and cache the response for 24 hours AND return the response
GIVEN a request is made to /institutions/:currency_code WHEN the cache is empty or expired for that currency code THEN fetch from source and cache the response for 24 hours AND return the response
GIVEN a request is made to /pubkey WHEN the cache is empty or expired THEN fetch from source and cache the response for 1 year AND return the response
GIVEN a request is made to any of these endpoints WHEN valid cached data exists THEN return the cached response without hitting the backend
GIVEN the application is starting up WHEN the server initializes THEN automatically fetch and cache all static data (currencies, institutions for supported currencies, pubkey) AND log the cache warming status for monitoring
Tech Details
Implement caching using Redis with the following keys:
User Story
As an API consumer, I need faster response times for frequently accessed, relatively static data endpoints (currencies, institutions, and public key), so that the application performs more efficiently and reduces unnecessary load on our backend services.
Acceptance Criteria
GIVEN a request is made to
/currencies
endpointWHEN the cache is empty or expired
THEN fetch from source and cache the response for 24 hours
AND return the response
GIVEN a request is made to
/institutions/:currency_code
WHEN the cache is empty or expired for that currency code
THEN fetch from source and cache the response for 24 hours
AND return the response
GIVEN a request is made to
/pubkey
WHEN the cache is empty or expired
THEN fetch from source and cache the response for 1 year
AND return the response
GIVEN a request is made to any of these endpoints
WHEN valid cached data exists
THEN return the cached response without hitting the backend
GIVEN the application is starting up
WHEN the server initializes
THEN automatically fetch and cache all static data (currencies, institutions for supported currencies, pubkey)
AND log the cache warming status for monitoring
Tech Details
Notes/Assumptions
Open Questions
The text was updated successfully, but these errors were encountered: