That sounds like it might work, but it makes the conditionals kind of
nasty, because sExMode = "end" and thistag.ExMode = "end" is different
than sExMode = "end" and thisTag.exMode = "start".  So you'd need a
four-way conditional, in addition to a check for start mode at the top
to check whether you should do the logic to see if you can set sExMode
= "end" becuase the cached version exists.

I think the UDF version is cleaner, because it keeps the logic flowing
in the "usual" way, it's just using a UDF to help reuse some code. 
And perhaps more to the point, that code is already written, tested,
and running.  ;)

cheers,
barneyb

On 8/25/05, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote:
> Barney,
> 
> What if you hack your own "executionMode" variable:
> 
> <cfset sExecutionMode = this.executionMode>
> 
> <cfif bUseCache AND sExecutionMode EQ "start">
>   <cfset sExecutionMode = "end">
> </cfif>
> 
> <cfswitch expression="#sExecutionMode#">
>   <cfcase value="start">
>   </cfcase>
>   <cfcase value="end">
>   </cfcase>
> </cfswitch>
> 
> -Dan
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216432
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to