awslabs / awslabs/agentcore-samples
06-workshops - [Bug] 07-Temporal Policies: CloudFront caches stale responses after server changes
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 1.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 30
Description
**In which component is this bug present?**
- [ ] 01-AgentCore-runtime
- [x] 02-AgentCore-gateway
- [ ] 03-AgentCore-identity
- [ ] 04-AgentCore-memory
- [ ] 05-AgentCore-tools
- [ ] 06-AgentCore-observability
- [ ] 07-AgentCore-E2E
**Bug Description**
Headers show `x-cache: Hit from cloudfront, age: 149`. Old responses persist after server changes.
Cause: CloudFront caches responses by default. Stale 302 redirects and old JSON responses persist even after server restart.
**Suggested Fix**
Add `Cache-Control: no-cache` headers to the static server, or configure the CloudFront distribution with appropriate cache behaviors for the workshop environment.
Contributor guide
Assessment
This issue has not been assessed yet.