diff --git a/config.yaml b/config.yaml index 07654228..891bdd62 100644 --- a/config.yaml +++ b/config.yaml @@ -98,8 +98,8 @@ # Cache duration for Wikipedia article links #wikipedia-article-cache-duration: 1h -# Cache duration for Twitch user links -#twitch-user-cache-duration: 1h +# Cache duration for Twitch username links +#twitch-username-cache-duration: 1h # Minimum level of log message importance required for the log message to not be filtered out. # Available levels: debug, info, warn, error diff --git a/internal/resolvers/twitch/user_resolver.go b/internal/resolvers/twitch/user_resolver.go index 6cf58e4c..081348b6 100644 --- a/internal/resolvers/twitch/user_resolver.go +++ b/internal/resolvers/twitch/user_resolver.go @@ -46,7 +46,7 @@ func NewUserResolver(ctx context.Context, cfg config.APIConfig, pool db.Pool, he r := &UserResolver{ userCache: cache.NewPostgreSQLCache(ctx, cfg, pool, cache.NewPrefixKeyProvider("twitch:user"), - resolver.NewResponseMarshaller(userLoader), cfg.TwitchUserCacheDuration), + resolver.NewResponseMarshaller(userLoader), cfg.TwitchUsernameCacheDuration), } return r diff --git a/pkg/config/model.go b/pkg/config/model.go index d4b68e1a..75bc0ccd 100644 --- a/pkg/config/model.go +++ b/pkg/config/model.go @@ -22,12 +22,12 @@ type APIConfig struct { SeventvEmoteCacheDuration time.Duration `mapstructure:"seventv-emote-cache-duration" json:"seventv-emote-cache-duration"` SupinicTrackCacheDuration time.Duration `mapstructure:"supinic-track-cache-duration" json:"supinic-track-cache-duration"` TwitchClipCacheDuration time.Duration `mapstructure:"twitch-clip-cache-duration" json:"twitch-clip-cache-duration"` - TwitchUserCacheDuration time.Duration `mapstructure:"twitch-user-cache-duration" json:"twitch-user-cache-duration"` TwitterTweetCacheDuration time.Duration `mapstructure:"twitter-tweet-cache-duration" json:"twitter-tweet-cache-duration"` TwitterUserCacheDuration time.Duration `mapstructure:"twitter-user-cache-duration" json:"twitter-user-cache-duration"` WikipediaArticleCacheDuration time.Duration `mapstructure:"wikipedia-article-cache-duration" json:"wikipedia-article-cache-duration"` YoutubeChannelCacheDuration time.Duration `mapstructure:"youtube-channel-cache-duration" json:"youtube-channel-cache-duration"` YoutubeVideoCacheDuration time.Duration `mapstructure:"youtube-video-cache-duration" json:"youtube-video-cache-duration"` + TwitchUsernameCacheDuration time.Duration `mapstructure:"twitch-username-cache-duration" json:"twitch-user-cache-duration"` LogLevel string `mapstructure:"log-level" json:"log-level"` LogDevelopment bool `mapstructure:"log-development" json:"log-development"`