<cfscript> someData = "Hello World!"; // Imagine that this step of the "procedure script" is a bit more intensive to // calculate. As such, we can easily cache this step without too much ceremony by // wrapping it in an Immediately Invoked Function Expression (IIFE) that makes use // of the cachedWithin function memoization feature. transformedData = (function() cachedWithin = createTimeSpan( 0, 1, 0, 0 ) { var letters = someData.reMatch( "." ); // Randomly sort the letters in the data. letters.sort( () => randRange( -1, 1 ) ); return( letters.toList( "" ) ); })(); echo( transformedData ); </cfscript>