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

Fix artwork caching #40

Merged
merged 2 commits into from
Jul 1, 2024
Merged

Fix artwork caching #40

merged 2 commits into from
Jul 1, 2024

Conversation

jocmp
Copy link
Collaborator

@jocmp jocmp commented Jul 1, 2024

Fixes a bug where the isFreshCache function always returned true for the following condition

cacheTime < today.plusDays(1)

which simplifies to the following statement which is always true

time_in_the_past < tomorrow // always true

The fix is to check the cache time plus a day against the current date

cacheTime.plusDays(1) > today

which simplifies correctly to

time_in_the_past_plus_one_day > now // may be true or false

@jocmp jocmp merged commit ee0b2cf into main Jul 1, 2024
1 check passed
@jocmp jocmp deleted the jc/fix-artwork-caching branch July 1, 2024 22:07
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.

None yet

1 participant