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 expires_in for library hours cache #810

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Use expires_in for library hours cache #810

merged 1 commit into from
Oct 30, 2024

Conversation

taylor-steve
Copy link
Contributor

The bug from #685 happened again.

Upon inspection, the redis ttl for the cache key was -1 for on both prod and stage. Once that's cleared, they work fine for a while. I know of at least two values that result in a -1 ttl for expires_at:

  • nil
  • A time in the past

We had a guard in place for times in the past, but maybe it didn't account for all situations. This PR switches to using expires_in with a value with stricter bounds which is hopefully safer.

@taylor-steve taylor-steve marked this pull request as ready for review October 30, 2024 00:11
@corylown corylown merged commit 036cf04 into main Oct 30, 2024
2 checks passed
@corylown corylown deleted the hours-cache branch October 30, 2024 13:06
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.

2 participants