RE: [coldbox:16995] Caching

If you are still storing the result bean in a shared scope (variables inside the CFC), I assure you your problems are not fixed. Wait until you push to production and 100 users all hit your app at once. They will be sharing the same result object in memory, and they will all be overwriting each other. If I understand what you are saying, your “fix” probably only appears to work because your dev server only has one person hitting the site at once.



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:


It’s actually been running in production since yesterday and I was only having an issue when users were logging in. It was just piling up the error messages so if you failed to login you would see every login failure message that had been created by every other failed login user. Everything else seems to be working fine.

It looks like the guy who designed this intended to get a new result object on every security interceptor request, which is the first thing that runs an any request for a secured page. Then, put it in the rc for the user to carry on through the rest of the request. In each function he pulls it from the rc, updates it with any errors or exceptions, then puts it back in the rc. Finally, he uses it to determine, success or failure and populate the message box.

So, you’re suggesting that the result object that is being passed via the rc though each function of the request is being simultaneously shared by every other user? I feel like I would have a lot more issues if that were true, but I’m still trying to figure this application out. I guess one reason might be is that it’s mostly used for logged in user events and there are only ever a few of them logged in at the same time. The vast majority of the website traffic is on the public side that doesn’t really use this object. I tried to create the same behavior that I experienced with the login on other pages, by purposely causing consecutive error, but it doesn’t do the same thing.

Okay, I’m just rambling now… Have a happy holiday and thanks again for your help.