Oh right, also On Nov 26, 3:04 am, Josh Hayes-Sheen <[email protected]> wrote: > Finally I believe the coldbox cache reap > method may not be threading properly, and will dig into that if time > allows.
It looks like it's an issue with the difference between which variables are passed into the thread scope, OpenBD doesn't pass the variables scope from a parent cfc by default, but DOES pass a "this" scope which can be used instead (http://wiki.openbluedragon.org/wiki/ index.php/CFTHREAD#Notes, Second and third paragraph) As a simple patch I just added an engine check, and under BlueDragon use a cfthread that uses the "this" scope, and leave the Adobe one to keep using "variables", I'm not sure this is the most elegant solution but as far as I can tell this solution is working, I admit however I don't really understand how the reaping process works well enough to be confident that I have not introduced any other bugs, All I know is that the cache is being reaped (The "time since last reaped" is updating, and old/expired objects do get removed) Patch hosted at http://grevian.org/~grey/cb3-obd/obd-thread-reap.patch and inlined below: --- ../patched/system/cache/providers/CacheBoxProvider.cfc 2010-11-08 10:52:28.000000000 -0500 +++ ./system/cache/providers/CacheBoxProvider.cfc 2010-11-26 03:19:07.252259501 -0500 @@ -555,11 +555,11 @@ <!--- check if in thread already ---> <cfif NOT instance.utility.inThread()> - - <cfthread name="#threadName#"> - <cfset variables._reap()> - </cfthread> - + <cfif server.coldfusion.productname eq "BlueDragon"> + <cfthread name="#threadName#"><cfset this._reap()></cfthread> + <cfelse> + <cfthread name="#threadName#"><cfset variables._reap()></ cfthread> + </cfif> <cfelse> <cfset _reap()> </cfif> @@ -772,4 +772,4 @@ </cfscript> </cffunction> -</cfcomponent> \ No newline at end of file +</cfcomponent> -- Open BlueDragon Public Mailing List http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon official manual: http://www.openbluedragon.org/manual/ Ready2Run CFML http://www.openbluedragon.org/openbdjam/ mailing list - http://groups.google.com/group/openbd?hl=en
