-
Notifications
You must be signed in to change notification settings - Fork 218
feat: make primary cache accessible from Context #2053
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
* @return the {@link IndexerResourceCache} associated with the associated {@link Reconciler} for | ||
* this context | ||
*/ | ||
IndexerResourceCache<P> getPrimaryCache(); |
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.
I don't like the fact that the IndexerResourceCache
interface allows access to creating new indices at any time when these would actually only take effect whenever the associated informers are initialized so I think we should split this interface into a read-only part and one to manage indexers. The alternative would be to only expose ResourceCache
instead of IndexerResourceCache
.
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.
I've added an IndexedResourceCache
interface that extends ResourceCache
to add the indexed-based retrieval and moved both classes to the reconciler package since they'd now be part of the API… It shouldn't break anything since the only thing that was used externally was the IndexerResourceCache
interface.
2f2171d
to
f3c7b39
Compare
This should rather target |
But I think we should we can go this way, just exposing the cache, and see if anybody would need actually more. |
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.
LGTM, apart that should target next.
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
Signed-off-by: Chris Laprun <claprun@redhat.com>
f3c7b39
to
08af84f
Compare
* feat: make primary cache accessible from Context Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: introduce IndexedResourceCache interface Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: move read-only cache interfaces to api package Signed-off-by: Chris Laprun <claprun@redhat.com> --------- Signed-off-by: Chris Laprun <claprun@redhat.com>
* feat: make primary cache accessible from Context Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: introduce IndexedResourceCache interface Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: move read-only cache interfaces to api package Signed-off-by: Chris Laprun <claprun@redhat.com> --------- Signed-off-by: Chris Laprun <claprun@redhat.com>
* feat: make primary cache accessible from Context Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: introduce IndexedResourceCache interface Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: move read-only cache interfaces to api package Signed-off-by: Chris Laprun <claprun@redhat.com> --------- Signed-off-by: Chris Laprun <claprun@redhat.com> Signed-off-by: Attila Mészáros <csviri@gmail.com>
* feat: make primary cache accessible from Context Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: introduce IndexedResourceCache interface Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: move read-only cache interfaces to api package Signed-off-by: Chris Laprun <claprun@redhat.com> --------- Signed-off-by: Chris Laprun <claprun@redhat.com> Signed-off-by: Attila Mészáros <csviri@gmail.com>
…2053) * feat: make primary cache accessible from Context Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: introduce IndexedResourceCache interface Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: move read-only cache interfaces to api package Signed-off-by: Chris Laprun <claprun@redhat.com> --------- Signed-off-by: Chris Laprun <claprun@redhat.com> Signed-off-by: Attila Mészáros <csviri@gmail.com>
* feat: make primary cache accessible from Context Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: introduce IndexedResourceCache interface Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: move read-only cache interfaces to api package Signed-off-by: Chris Laprun <claprun@redhat.com> --------- Signed-off-by: Chris Laprun <claprun@redhat.com> Signed-off-by: Attila Mészáros <csviri@gmail.com>
* feat: make primary cache accessible from Context Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: introduce IndexedResourceCache interface Signed-off-by: Chris Laprun <claprun@redhat.com> * refactor: move read-only cache interfaces to api package Signed-off-by: Chris Laprun <claprun@redhat.com> --------- Signed-off-by: Chris Laprun <claprun@redhat.com> Signed-off-by: Attila Mészáros <csviri@gmail.com>
Alternative to #2051