> Why not just use the function name like:
> myFunctionName.FunctionData

I'm not using the hashed name to reference the function itself, I'm
using it to access the result of the data generated _by_ the function
which I've stored in a structure, e.g.:

Struct key                        | Struct data
---------------------------------------------------------
i8CF622BA70E703A796DB0FD8AC8ABFA8 | my output
i21F03E4F6B46952A374A228F31CE2A34 | other function output
i0F900EF34F65DA8FC21B6B8DF70E3767 | some more output

So it means that before I run the function I can check if I've already
got the output from it cached so I don't need to run it again:

<cfset this.KEYPREFIX = "i">
<cfset key = this.KEYPREFIX & hash(myFuncRef.toString())>

<cfif isdefined("cache.#key#")>
    <cfreturn cache[key]>
<cfelse>
    <cfreturn myFuncRef()>
</cfif>

Tim.

-------------------------------------------------------
RAWNET LTD - Internet, New Media and ebusiness Gurus.
Visit our new website at http://www.rawnet.com for
more information about our company, or call us free
anytime on 0800 294 24 24.
-------------------------------------------------------
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Reply via email to