Describe the story
Provide a clear description of the new feature or improvement to existing functionality.
As a user, I want my frequently accessed data to be cached so that I may receive responses as quickly as possible.
Requirements
Infrastructure
- Use AWS Elasticache Valkey as the distributed cache service.
- Our infrastructure priority is cost optimization.
- Add infrastructure configuration variables to allow the cache to be sized or scaled with environment variables. Prefix variables with
CDK_CACHE_.
- The cache hostname should be passed to the application task definition using the
CACHE_HOST application configuration variable.
Application
- Add a configuration variable for the cache host, e.g.
CACHE_HOST which is optional and has no default value.
- Add a configuration variable for the default cache time to live, e.g.
CACHE_TTL_MS expressed in milliseconds. The default value if not specified is 300000 or 5 minutes.
- Use an in-memory cache when working on the local machine, if the valkey host configuration variable is not defined.
- Use a Valkey cache when the valkey host configuration variable is defined.
Acceptance criteria
Provide clear acceptance criteria to validate the story is complete.
Gherkin syntax example:
Given the 'PERSONA' has 'DONE SOMETHING'
When the 'PERSONA' does 'ONE THING'
Then the 'PERSONA' must do 'ANOTHER THING'
Additional context
Add any other context about the story here.
Describe the story
Provide a clear description of the new feature or improvement to existing functionality.
As a user, I want my frequently accessed data to be cached so that I may receive responses as quickly as possible.
Requirements
Infrastructure
CDK_CACHE_.CACHE_HOSTapplication configuration variable.Application
CACHE_HOSTwhich is optional and has no default value.CACHE_TTL_MSexpressed in milliseconds. The default value if not specified is300000or 5 minutes.Acceptance criteria
Provide clear acceptance criteria to validate the story is complete.
Gherkin syntax example:
Additional context
Add any other context about the story here.