Hello, given I have several singleton usecases def...
# kodein
d
Hello, given I have several singleton usecases defined in a module. How to scope their creation to the value of a variable, like the current user? I read the documentation, but couldnt figure it out.
r
Hello, you need to create your own Scope, and then you can bind and retrieve your instances from the Scope. Is that what you are looking for?
d
Sounds good. I will take a look. Can we scope a whole module?
r
That is not possible, but I could be a nice feature indeed.
d
In the example of creating a Scope there is a Context called Session. Could you provide an implementation example of Session? Should I use the User instance as the session in my example?