envelop icon indicating copy to clipboard operation
envelop copied to clipboard

redis cache set ttl in seconds

Open ramiel opened this issue 9 months ago • 5 comments

🚨 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

ramiel avatar Apr 02 '25 18:04 ramiel

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

EmrysMyrddin avatar May 09 '25 19:05 EmrysMyrddin

Done, sorry for the mess

ramiel avatar May 14 '25 08:05 ramiel

Do you think we can have tests?

ardatan avatar May 14 '25 13:05 ardatan

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.

ramiel avatar May 15 '25 11:05 ramiel

Hi ! I'm not sur to follow where it is stated in the documentation that the TTL is in seconds ?

EmrysMyrddin avatar Jun 10 '25 08:06 EmrysMyrddin