useless IO traffic? I never tried this approach in production but I
don't believe there are a lot of problems with this construction in
terms of memory.
<cfapplication name="persistencyTest" sessionmanagement="yes"
clientmanagement="no">
<cflock scope="application" type="exclusive" timeout="1">
<cfif NOT IsDefined('application.IOFactory')>
<!--- loaded CFC into cache --->
<cfset IOFactory =
createObject('component','myfunction').init()>
<cfset application.IOFactory = IOFactory>
<cfelse>
<!--- loaded CFC from cache for reuse without re-calling
the class --->
<cfset IOFactory = application.IOFactory>
</cfif>
</cflock>
Micha Schopman
Software Engineer
Modern Media, Databankweg 12 M, 3821 AL Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

