-
Notifications
You must be signed in to change notification settings - Fork 37
Update ttlcache library to v3, disable TTL extension on hit #338
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
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-cloudstack ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #338 +/- ##
==========================================
+ Coverage 25.45% 25.52% +0.06%
==========================================
Files 59 59
Lines 5555 5560 +5
==========================================
+ Hits 1414 1419 +5
Misses 4002 4002
Partials 139 139 ☔ View full report in Codecov by Sentry. |
Thanks for the PR @hrak! |
Signed-off-by: Hans Rakers <[email protected]>
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.
thanks for the fix!
pkg/cloud/client.go
Outdated
"github.com/apache/cloudstack-go/v2/cloudstack" | ||
ttlcache "github.com/jellydator/ttlcache/v3" |
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.
nit: is the alias needed?
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.
+1. We don't need the alias here.
pkg/cloud/client.go
Outdated
var client interface{} = item.Value() | ||
return client.(Client), nil |
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.
this is more for my own understanding than a request for change
But, why is casting required ifttlcache.Cache
is parametrized with the types for key and value?
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
@hrak some minor code changes required. |
/ok-to-test |
/remove-lifecycle stale |
Co-authored-by: Vishesh <[email protected]>
Co-authored-by: Vishesh <[email protected]>
/retest |
Test Results : (tid-427)
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hrak, vishesh92 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Issue #, if available:
Fixes #336
Description of changes:
This PR gives the ttlcache library a major update and disables TTL extension on cache item hit.
Testing performed:
make test
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.