K - the type of the cache keyV - the type of the cached valuepublic interface DependencyCalculatorI<K,V>
| Modifier and Type | Method and Description |
|---|---|
long[] |
calculateDependencies(K key,
V value)
This method calculates for a given object the ids of objects, which can invalidate
the cached state.
|
long[] calculateDependencies(K key, V value)
e.g. BO A contains the sum of BO B and BO C. Normal BOChangeEvents only allow looking for explicit changes to A. If this method is implemented and additionally returns the IDs of B and C, then the cache containing A is automatically invalidated, if either B or C changes.
key - the cache key of the object. Guaranteed to be non-null by the cache contract.value - the currently cached value which might depend on other objects. Can be null (e.g. if caching a "not found" state).Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.