[coldbox-3.6.0] Flash plugin adding prc data to rc upon reinflation

We’re working on converting some model-glue code to ColdBox and I had a question about state persistence and setNextEvent. In our old model-glue code we had something in our event xml like . That persist=true bit would maintain all event data between event redirects (when we’d call addResult from a controller). In ColdBox we wanted to do essentially the same thing – that is, when we called setNextEvent we’d like the event we’re redirecting to to have access to the rc and prc from the event that called setNextEvent. We’ve looked at the flash plugin and are trying to see how to get both rc and prc to be reinflated in their respective places. Here are a few things we’ve tried and the results we’ve gotten:

`

<cfset flash.persistRC(exclude=“event”) />

<cfset flash.put(name=“bar”, value=“baz”, inflateToPRC=true) />

<cfset setNextEvent(“b”) />

`

And b.cfm looks like

`

RC

PRC

`

When I visit /mysite/a/foo/1/bar/2 I get redirected to b and the dumps of rc/prc show that bar=baz is in the prc. However, it also shows that bar=baz is in the rc, and overwrote bar=2. foo=1 does show up in the rc as expected.

In our app we frequently receive keys from a form that get put in the rc and which we wish to have access to separately from what’s in the prc. We have logic that checks whether a particular key is present in the rc and then defaults to the value stored at the same key in the prc if it wasn’t in rc, or may simply have the same key in both and need both values. Is there a way to get flash.put(inflateToPRC=true) to not inflate to the rc also? We’re currently running ColdBox v 3.6.0. so I don’t know if this is something that was changed in a later version.

I also tried doing

<cfset flash.putAll(map=arguments.prc, inflatetoPRC=true) />

and the prc gets reinflated to both rc and prc in the ‘b’ event.