-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/add ttl to response #44
Conversation
Reviewer's Guide by SourceryThis pull request adds a Time-To-Live (TTL) feature to the response objects in the pydantic_tfl_api. The TTL is calculated based on the 's-maxage' directive in the 'cache-control' header of the HTTP response. The changes involve updating the client to parse this header and calculate the expiry time, and modifying the models to include a 'content_expires' field. File-Level Changes
Tips
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mnbf9rca - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 9 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
resolves #43
Summary by Sourcery
This pull request introduces a TTL (time-to-live) feature for API responses by calculating expiration times from the 'cache-control' header. It also updates the Pydantic models to include a 'content_expires' property and updates the README to document these changes.