I was thinking something along these lines. Could you show a quick example. I was thinking it may be possible to create a global component variable to hold the returned data and if that data existed to not reinitialize the function. I think we are talking about the same thing, but I'm having trouble getting it to work.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Thomas Chiverton Sent: Thursday, October 16, 2003 10:14 AM To: [EMAIL PROTECTED] Subject: Re: [CFCDev] Initialize only once Use the constructor area to create a 'result' variable. in the method code, if this variable has a value, return the value, else run the method body, save the result in the result variable, and return that. It strikes me you could easily(*) write a Memoise.cfc that could be fed a component/method, and would return that method, wrapped inside a block like that above :-) ---------------------------------------------------------- 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]
