Skip to content
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

Use absolute timestamps when dealing with expiry from Redis #317

Merged
merged 3 commits into from
May 10, 2024

Conversation

alexsnaps
Copy link
Member

No description provided.

end
table.insert(res, redis.call('pexpiretime', counter_key))
Copy link
Member Author

Choose a reason for hiding this comment

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

This isn't ideal, as pexpiretime was introduced in Redis 7... that being said, elasticache supports it

Copy link
Member

Choose a reason for hiding this comment

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

Not that it matters right now but it's also supported by memorystore and I think Azure cache

@alexsnaps alexsnaps mentioned this pull request May 8, 2024
(Instant::now() - time_start_update_counters).as_millis() as u64
),
);
cached_counters.apply_remote_delta(counter, new_value, remote_deltas, ttl);
Copy link
Member

Choose a reason for hiding this comment

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

nit: maybe we should also change this ttl to expires_at

Copy link
Member

@adam-cattermole adam-cattermole left a comment

Choose a reason for hiding this comment

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

Updates look good, nice one

@alexsnaps alexsnaps merged commit 00bc5c1 into main May 10, 2024
20 checks passed
@alexsnaps alexsnaps deleted the absolute_ts branch May 10, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants