redis cache set ttl in seconds
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
Description
Redis cache for response-cache should follow the same ttl meaning of the related plugin, so ttl should be in seconds.
Fixes #2539
Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented on my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Hi ! Thank you for your PR ! Can you please run prettier ? It's a bit difficult to review since their is a lot of formatting changes:
pnpm prettier
Done, sorry for the mess
Do you think we can have tests?
Done. I updated the tests to consider the ttl as seconds instead of milliseconds.
The code was expecting the ttl to be given in milliseconds, but the documentation clearly states that the TTL is given in seconds.
Hi ! I'm not sur to follow where it is stated in the documentation that the TTL is in seconds ?