Skip to content

Conversation

julienbourdeau
Copy link
Contributor

Redis::CommandError: ERR invalid expire time in 'set' command

I'm not entirely sure what happens here but I think, since some services use expires_in: 0, down the line, we compute an invalid expiration time (in the past). As far as I understand, expires_in: 0 is not a NO-OP, it still writes to the cache, yet, it's instantly invalid.

I replaced the fetch call by a manual read/compute/write combo. I'm open to any better idea.

@julienbourdeau julienbourdeau self-assigned this May 22, 2025
@julienbourdeau julienbourdeau force-pushed the fix/cache-invalid-expiration-time branch from 2a2b06e to 2d5364d Compare May 22, 2025 09:32
@julienbourdeau julienbourdeau force-pushed the fix/cache-invalid-expiration-time branch from 2d5364d to 51788de Compare May 22, 2025 09:35
Copy link
Contributor

@ancorcruz ancorcruz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@julienbourdeau julienbourdeau merged commit f300970 into main May 26, 2025
14 checks passed
@julienbourdeau julienbourdeau deleted the fix/cache-invalid-expiration-time branch May 26, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants