Open
Description
Describe the current behavior
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
Metadata
Metadata
Assignees
Labels
No labels