Closed schuettecarsten closed 4 years ago
I built up this scenario in this test but it's passing, could you check it please that I missed something or what could be the difference from what you described? Thanks!
Hmm, okay, it looks like it was an error on my side, sorry.
I have the following classes/constructors:
The ProductCache is registered using
.DefinesScope().WithLifetime(Lifetimes.Singleton).WithoutDisposalTracking()
. The ProductService is transient.When I now request a ProductService instance from Stashbox, the ProductCache instance (cache) is created in a separate scope. That's fine so far. But the repo parameter value in the ProductCache constructor call and in the ProductRepository constructor call are the same. I would expect that different repo instances are created here, as the ProductCache should completely live in a separate scope.