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

Deep copy by default #19

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bugfix: Use provided cache options
The options passed to `NewObjectCache` were not actually being copied
into the returned object cache.

Signed-off-by: Justin Kulikauskas <[email protected]>
JustinKuli committed Apr 30, 2024
commit d882bc3af2b13e7fd0e540cbf97c3082fbc02d3b
1 change: 1 addition & 0 deletions client/cache.go
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ func NewObjectCache(discoveryClient *discovery.DiscoveryClient, options ObjectCa
cache: &sync.Map{},
gvkToGVRCache: &sync.Map{},
discoveryClient: discoveryClient,
options: options,
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Was this just missed (or unnecessary) previously?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it was just missed. The other options aren't tested (and I think that's ok; they'd be annoying to test for a low payoff).

}
}