Object Scopes
You can very easily add persistence to your model+ objects via our annotations or binder configuration. The available scopes are:
transient or no scope: The default scope. Meaning objects have no scope, they are recreated every single time you request them.singleton: Objects are created once and live until your Application expirescachebox: You can store your objects in any CacheBox provider and even provide timeouts for themsession: Store them in the ColdFusionsessionscopeserver: Store them in the ColdFusionserverscoperequest: Store them in the ColdFusionrequestscopeapplication: Store them in the ColdFusionapplicationscopeCUSTOM: You can build your own scopes as well.
// transient
component name="MyService"{}
// singleton
component name="MyService" singleton{}
// cache in default provider
component name="MyService" cache="true" cacheTimeout="45" cacheLastAccessTimeout="15"{}
// cache in another provider
component name="MyService" cachebox="MyProvider" cacheTimeout="45"{}
// request scope
component name="MyService" scope="request"{}
// session
component name="MyService" scope="session"{}Hint Pease note that using annotations is optional, you can configure every object in our configuration binder as well.
Object Persistence & Thread Safety: http://wirebox.ortusbooks.com/advanced-topics/object-persistence-and-thread-safety
Was this helpful?