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

Make resolver cache durations configurable #419

Merged

Conversation

M4tthewDE
Copy link
Contributor

@M4tthewDE M4tthewDE commented Jan 24, 2023

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

Should be reviewed carefully, since wrong default cache durations can slip in easily.
There might be some caches that aren't of type NewPostgreSQLCache of which I might be unaware of.
Closes #410

@codecov
Copy link

codecov bot commented Jan 24, 2023

Codecov Report

Merging #419 (459c183) into master (031b678) will increase coverage by 0.26%.
The diff coverage is 94.44%.

@@            Coverage Diff             @@
##           master     #419      +/-   ##
==========================================
+ Coverage   44.49%   44.76%   +0.26%     
==========================================
  Files         101      101              
  Lines        3713     3731      +18     
==========================================
+ Hits         1652     1670      +18     
  Misses       2013     2013              
  Partials       48       48              
Impacted Files Coverage Δ
internal/caches/twitchusernamecache/cache.go 0.00% <0.00%> (ø)
internal/resolvers/oembed/resolver.go 0.00% <0.00%> (ø)
internal/resolvers/betterttv/emote_resolver.go 100.00% <100.00%> (ø)
internal/resolvers/default/link_resolver.go 44.85% <100.00%> (ø)
internal/resolvers/discord/invite_resolver.go 53.84% <100.00%> (ø)
internal/resolvers/frankerfacez/emote_resolver.go 100.00% <100.00%> (ø)
internal/resolvers/imgur/resolver.go 89.28% <100.00%> (ø)
...nternal/resolvers/livestreamfails/clip_resolver.go 100.00% <100.00%> (ø)
internal/resolvers/seventv/emote_resolver.go 100.00% <100.00%> (ø)
internal/resolvers/supinic/track_resolver.go 35.71% <100.00%> (ø)
... and 7 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@pajlada pajlada left a comment

Choose a reason for hiding this comment

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

Revert the "header cache configuration" piece, they should be based on the provider's cache duration as stated in the TODO

@pajlada pajlada changed the title Make cache durations configurable Make resolver cache durations configurable Jan 26, 2023
@pajlada pajlada enabled auto-merge (squash) January 27, 2023 09:13
@pajlada pajlada merged commit 7c59cf9 into Chatterino:master Jan 27, 2023
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.

Make cache timeout values configurable
2 participants