We have a handler that injects a service as a prop...
# box-products
d
We have a handler that injects a service as a property. We have a React dashboard that calls 2 different methods on this handler (
Safety()
and
Improvements()
), both of which end up calling the same
list()
function on the injected Service. If
handlerCaching
is true in ColdBox.cfc, the correct handler methods get called from React but they end up with the same response from the list function in the service. Problem is solved if I disable
handlerCaching
. Also, if we keep
handlerCaching
enabled, remove the injected service property, and instead use getInstance twice, once in
Safety()
and once in
Improvements()
, to create the Service object in the handler, this also solves the problem. Is this weird? Are we doing something wrong?