I’ve discovered a bug in the inflateFlash() method of AbstractFlashScope.cfc where it resets a variable’s inflateToRC and inflateToPRC properties back to their default values when the flash RAM is inflated. Due to the way inflateFlash() works, this bug only really affects variables with autoPurge=false (or those that have been “kept” for another request cycle.
The bug is on line 110 of AbstractFlashScope.cfc. Here is the original line:
put(name=key,value=flash[key].content,keep=keep,autoPurge=flash[key].autoPurge);
As you can see, it doesn’t specify values for the “inflate” arguments so the default values are used. This fixes the issue:
put(name=key, value=flash[key].content, keep=keep, inflateToRC=flash[key].inflateToRC, inflateToPRC=flash[key].inflateToPRC, autoPurge=flash[key].autoPurge);