ShadoCMS comes with caching mechanism for the creating and caching ShadoCMS objects. Using the ShadoCMS Object Factory can enhance ShadoCMS's performance. The ShadoCMS object factory a) Instantiates ShadoCMS objects, and caches the objects it instantiates. Caching of these objects provides ShadoCMS with a performance boost.. The object factory lives in the application scope. The factory is instantiated each time the ShadoCMS application starts up. Alternately, it can be restart/stopped/started through the Shado Central interface, or through the componentCache component.
Turning off component caching
Often one would like to disable component caching while developing. Invariably they would just use createObject() with all intention of converting the call to use the object factory 'when they were done'. However, nothing ever is, and so it isn't. But! Help is at hand. If you set request.noComponentCache in the as true, the componentCache (shado_obj_factory) will just create and return the component directly, rather than from cache.
<!---
To use the object factory simply call your component using the get method of the factory
If the component is not in the cache then it will be automatically added
--->
<cfset oGlobals = application.shado_obj_factory.get("ShadoCMS.services.context.shado_obj_globals")>
<!--- Clearing the object factory cache --->
<cfparam name="attributes.scope" default="application">
<cfset application.shado_obj_factory.clearScope(scope=attributes.scope)>
<!--- Restarting the component cache --->
<cfset oService = application.shado.serviceManager.getService("componentCache")>
<cfset oService.stop()>
<cfset application.shado.serviceManager.registerService(service="componentCache",runAt="application",refresh=true,servicePath="ShadoCMS.services.componentCache")>
<cfset oNull = application.shado.serviceManager.getService(service="componentCache")>

