Reputation: 37
I have a session which is a collection of structures
so it may be
SESSION.squad.achievements[2010] = "swam 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?
Upvotes: 1
Views: 1799
Reputation: 1402
Try using cflock
<cflock timeout="30" throwontimeout="No" type="EXCLUSIVE" scope="SESSION">
<cfset StructDelete(SESSION.squad.achievements, myYear)>
</cflock>
Upvotes: 2