Hi,
I have a question regarding cached handlers and injected components.
I have a component, which is operating as a store.
`
component scope=“session” hint=“this store can store some objects…”{
LightboxBasketStore function init(){
.
.
.
return this;
}
}
`
To check when my handler or store were created, I added a createDate.
My handler got the store injected:
`
property name=“LBStore” inject=“id:LightboxBasketStore@aki”;
`
When I disable handler caching in my Coldbox.cfc [coldbox.handlerCaching = false;] my handler is created on each request, but my store keeps the same. So with different sessions on different browsers, each user has its own store. (Correct)
Now I want my handler to be persistent, with own storage for each user. I enable handler caching. Now the handler is not created on each request. So in defferent browsers, I get the same handler, but as well the same store. (wrong!)
Did I misunderstand something? Do I need to inject the store into session scope? I expected it to be created for each user, because the store itself hast the ‘scope=“session”’ attribute.
Hope to get help soon,
thx in advance. Andy