You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public List<Resource<SubstationAttributes>> getSubstations(UUID networkUuid, int variantNum) {
ensureCached(ResourceType.SUBSTATION, networkUuid, variantNum);
return delegate.getSubstations(networkUuid, variantNum);
}
private void ensureCached(ResourceType resourceType, UUID networkUuid, int variantNum) {
loadToCache(resourceType, networkUuid, variantNum);
resourceTypes.add(resourceType);
}
private void loadToCache(ResourceType resourceType, UUID networkUuid, int variantNum) {
delegate.getSubstations(networkUuid, variantNum);
}
wee call getSubstations twice, so it works only for CachedNetworkStoreClient
Describe the expected behavior
refactor the code to force the delegate to be of type cachednetworkstoreclient for preloadingnetworkstoreclient ? because it doesn't make sense to preload for a client that doesn't not cache.
Describe the motivation
reduce code complexity
Extra Information
No response
The text was updated successfully, but these errors were encountered:
when we are not preloading, we should call the delegate only once (e.g. getSubstations() and not ALL_COLLECTION_FOR_BUS_VIEW or getSwitches)
when we are preloading (first time calling (checked with cachedResourcesTypes) either getSubstation() or getSubstations and ALL_COLLECTION_FOR_BUS_VIEW), call the method with more data, and then call the right method.
Describe the current behavior
wee call getSubstations twice, so it works only for CachedNetworkStoreClient
Describe the expected behavior
refactor the code to force the delegate to be of type cachednetworkstoreclient for preloadingnetworkstoreclient ? because it doesn't make sense to preload for a client that doesn't not cache.
Describe the motivation
reduce code complexity
Extra Information
No response
The text was updated successfully, but these errors were encountered: