-
Notifications
You must be signed in to change notification settings - Fork 25
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
Release 1.5 #59
Release 1.5 #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it!
@@ -366,7 +366,7 @@ func (ds *StravaDatasourceInstance) StravaAPIQueryWithCache(requestHash string) | |||
return nil, err | |||
} | |||
if query.Endpoint == "athlete/activities" { | |||
ds.cache.SetWithExpiration(requestHash, response, time.Minute*5) | |||
ds.cache.Set(requestHash, response) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be interested in a comment on why the expiration is no longer required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, makes sense. Previously I used predefined cache TTL (5 min) for athlete/activities
endpoint, but once I added cache TTL to data source config, I think it's better to use the same interval for all queries. My only concern is fetching recently added activities - it's not possible until cache is expired. Maybe I'll add some smart fetching in next release (always fetch data within cache TTL, like 1 hour, in separate query).
WIP for 1.5 release