I have a session which is a collection of structures
SESSION.squad.achievements[key]
so it may be
SESSION.squad.achievements[2010] = "swam 开发者_JAVA百科the english channel";
SESSION.squad.achievements[2009] = "ran a marathon";
SESSION.squad.achievements[2008] = "cycled Le Tour";
My code deletes the stucture temporarily, but does not delete the session so when I refresh the value still exists
<cfset myYear = #myYear# />
<cfset #StructDelete(SESSION.squad.achievements, myYear)#>
Any ideas how I can delete this value?
Try using cflock
<cflock timeout="30" throwontimeout="No" type="EXCLUSIVE" scope="SESSION">
<cfset StructDelete(SESSION.squad.achievements, myYear)>
</cflock>
精彩评论