-
Notifications
You must be signed in to change notification settings - Fork 236
Description
There are cases when users would like to cache some information that persists across the reconciliation of primary resources.
Typical use case what we see in some controllers, that in status the state is persisted, but it is not guaranteed that in the next reconciliation, the up-to-date primary resource will be present (although we might be able to guarantee that in the future - but that is a question mark for now), in that case, the status can be also cached, thus made sure that it is available as such in next reconciliation.
From the controller side what we can do is also clean this cache when a DELETE event is received for the primary resource. (In Processor already such cleanup is happening regarding other states)
API could look like this.
Map<String,Object> Context.getCache()
or just:
Context.putToCache(String key, T value);
T Context.getFromCache(String key);