I know, I don't want to use the server scope.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Marcantonio Silva
Sent: Thursday, October 16, 2003 9:46 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Initialize only once


Hi,

It calls the function, but it doesn�t hit the file, because the SERVER scope
is persistent until the server is shut down.
When it tries
<cfif NOT structKeyExists(server,"myCFCConfig")>
the second time, this will returns TRUE for structKeyExists, even if you
leave your app, close your browser or timeout your Application or session.
The only way to get rid of the SERVER keys is to implicit destroy it
    (StructDelete(SERVER , "myCFCConfig")

But yes, you can always cache your component and test outside your method
call, as:
<cfif NOT structKeyExists(server,"myCFCConfig")>
    (CALL METHOD INIT)
</cfif>

[]s


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to