Closed doozMen closed 8 months ago
Not seeing where you're caching here, but that's true, and mentioned in the documentation for ParameterFactory.
"Finally, if you define a scope keep in mind that the first argument passed will be used to create the dependency and that dependency will be cached. Since the cached object will be returned from now on any arguments passed in later requests will be ignored until the factory or scope is reset."
Since parameters can be anything (simple variables, structs, classes) turning them into keys could well generate a near-infinite set of values.
If you have a limited set of values you could use sub-factories that cache individually and call them from an uncached ParameterFactory.
Ok so it is thé expected behavior and logical with your explanation. Then you can close the issue
Conder this
For a container that uses caching
This when instantiate
So the key here does not take into a account he parameter names, so caching will not work as it will for different parameters not dismiss the cache but return the same value.
So the test below fails when you use caching but when it is unique it succeeds