Skip to content

fix: redis 4 adapter not an integer or out of range error#18

Merged
Xiphe merged 1 commit intoepicweb-dev:mainfrom
TapaiBalazs:fix/17-redis-ttl
Dec 14, 2022
Merged

fix: redis 4 adapter not an integer or out of range error#18
Xiphe merged 1 commit intoepicweb-dev:mainfrom
TapaiBalazs:fix/17-redis-ttl

Conversation

@TapaiBalazs
Copy link
Contributor

In this PR

  • Added Math.ceil() to the redisAdapter EXAT parameter to prevent ERR value is not an integer or out of range errors with real redis instances
  • Updated the redis 4 related test.

Closes #17

Please note that you can entirely disregard my PR if you have a better solution. If I had time, I would have changed the tests in a way, that Date.now() would return a more real-like timestamp, but that would also require me to update all other tests.

@Xiphe
Copy link
Collaborator

Xiphe commented Dec 14, 2022

Cool 👍 thanks for the contribution

@Xiphe Xiphe merged commit 58f0602 into epicweb-dev:main Dec 14, 2022
@Xiphe
Copy link
Collaborator

Xiphe commented Dec 14, 2022

damn, hit enter to early while editing the commit message. My bad 😅

@github-actions
Copy link

🎉 This PR is included in version 3.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

redisCacheAdapter does not cache if ttl is set because of the

2 participants