With cacheModelInitialization set to false, every onRequestStart will clear the model initialization cache (wheels/events/onrequeststart.cfm:84) which does a StructClear on application.wheels.models (wheels/global/internal.cfm:811). Unfortunately, there are a bunch of accesses to application.wheels.models that assume that the model exists in the cache by the time they are called. The specific one that is causing errors in our project is in $initModelObject in wheels/model/initialization.cfm (line 237 is the culprit). $initModelObject is assuming that model("XXX") has been called and that the model with name 'XXX' will be found in application.wheels.models. It has a bare struct reference: object = application.wheels.models[arguments.name] which fails if, between the time that the model object was accessed and the time that this method executes, the model cache has been cleared.
With cacheModelInitialization set to false, every onRequestStart will clear the model initialization cache (wheels/events/onrequeststart.cfm:84) which does a StructClear on application.wheels.models (wheels/global/internal.cfm:811). Unfortunately, there are a bunch of accesses to application.wheels.models that assume that the model exists in the cache by the time they are called. The specific one that is causing errors in our project is in $initModelObject in wheels/model/initialization.cfm (line 237 is the culprit). $initModelObject is assuming that model("XXX") has been called and that the model with name 'XXX' will be found in application.wheels.models. It has a bare struct reference: object = application.wheels.models[arguments.name] which fails if, between the time that the model object was accessed and the time that this method executes, the model cache has been cleared.