Currently AFS uses by default a NetworkCacheService implementation which actually caches networks, but causes issues in multithreaded environement. Users are usually not aware of the existence of that cache, which is hidden in the implementation of "getNework" methods of ProjectCase. In particular they do not know that they will be using the same Network instance in different threads.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
To reproduce the multithreading issue linked to the default behaviour, try accessing a state variable of a Network from the same ImportedCase in 2 different threads, after having set the "allowMultiThreadVariant" flag.
What is the expected behavior?
The default behaviour should instead to have a dummy implementation which reads from the underlying storage for each call, and does not cache anything.
What is the motivation / use case for changing the behavior?
The current behaviour is not documented and causes unexpected and hard to debug issues in a multithreaded environement (any server typically).
Please tell us about your environment:
PowSyBl Version: 2.3.0
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
Feature.
Currently AFS uses by default a NetworkCacheService implementation which actually caches networks, but causes issues in multithreaded environement. Users are usually not aware of the existence of that cache, which is hidden in the implementation of "getNework" methods of
ProjectCase
. In particular they do not know that they will be using the same Network instance in different threads.To reproduce the multithreading issue linked to the default behaviour, try accessing a state variable of a Network from the same ImportedCase in 2 different threads, after having set the "allowMultiThreadVariant" flag.
The default behaviour should instead to have a dummy implementation which reads from the underlying storage for each call, and does not cache anything.
The current behaviour is not documented and causes unexpected and hard to debug issues in a multithreaded environement (any server typically).
Please tell us about your environment:
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)