RE: [coldbox:17978] setNextEvent and requestEndHandler Question

Think of runEvent() as an include and setNextEvent() as a cflocation (which aborts and immediately jumps to the next event.

What are you wanting to run after each request?

We have some unique cache/session data that we need to clean up at the end of each request. It works great for any straight-forward request, but anything that has a setnextevent, it fails. That’s what I’m trying to resolve. Is there any other mechanism that might get called toward the end of the request but before the actual re-direct?

Thanks!

-Jake

Couldn’t you make use of the postHandler() implicit event in the handler?

`

var rc = event.getCollection();

`

That’s a great idea. I’ll set up an interceptor to run postProcess intercept points so it’ll run always.

Thanks!

-Jake

What version of CF or Railo are you using? I never knew this until today, but starting in CF9, onRequestEnd gets run when you use cflocation or cfabort. I think that means that your ColdBox on request end should fire since it’s extended from your Application.cfc.

Here’s a fun tidbit-- if you put an abort in your Application.cfc’s onRequestEnd, it gets run twice! (on CF9 at least)

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com