Simple Flash RAM Question

Hey Guys,

I’m hitting a stupid ColdBox 101 wall. In building my new eCommerce system using CB 3, I’m planning of making use of the Flash RAM a lot more.

In looking at the docs, I see a lot of old CB 2 documentation, and in looking at the new changes for CB 3, I’m getting confused. I’ve tried 4 different methods with no luck.

Here is the scenario.

Event one posts to event two. The purpose of event two is to quickly decide if the post is valid (not a hack). If good, it is supposed to put the RC in Flash, and pass off to event three for processing.

In event two, I tried setNextEvent(event=‘three’, persistStruct=rc). The API says to use persistStruct, the docs say to use varStruct. Confused there…

Then I tried:

Not sure which is the best or correct method, and how I would best get the vars back in to RC in event three.

Aside: Should that check happen in event 2? What if I access event 3 directly?

  • Gabriel

Event three will be private.

Off the top things look right.

Have you verified you have the FlashRAM working?

Aaron Greenlee

It doesn’t throw any errors and I added:

// Flash scope
FlashURLPersistScope = “Session”

to my ColdBox.cfc.

If I reference “flash” inside a handler method, I can see its properties…

Never mind, resolved it.