@@ -90,12 +90,18 @@ type CacheOptions struct {
90
90
type NewClientFunc func (config * rest.Config , options Options ) (Client , error )
91
91
92
92
// New returns a new Client using the provided config and Options.
93
- // The returned client reads from a local cache or directly from the API server,
94
- // and writes are always performed directly on the API server.
95
- // (read operations may use object caches, but write operations do not).
96
- // It understands how to work with normal types (both custom resources
97
- // and aggregated/built-in resources), as well as unstructured types.
98
93
//
94
+ // The client's read behavior is determined by Options.Cache.
95
+ // If either Options.Cache or Options.Cache.Reader is nil,
96
+ // the client reads directly from the API server.
97
+ // If both Options.Cache and Options.Cache.Reader are non-nil,
98
+ // the client reads from a local cache. However, specific
99
+ // resources can still be configured to bypass the cache based
100
+ // on Options.Cache.Unstructured and Options.Cache.DisableFor.
101
+ // Write operations are always performed directly on the API server.
102
+ //
103
+ // The client understands how to work with normal types (both custom resources
104
+ // and aggregated/built-in resources), as well as unstructured types.
99
105
// In the case of normal types, the scheme will be used to look up the
100
106
// corresponding group, version, and kind for the given type. In the
101
107
// case of unstructured types, the group, version, and kind will be extracted
0 commit comments