potential caching bug

I have a scenario where the caching appears to break in v3.1 - the
eventCacheEntry that is passed back is a string rather than a
structure, which causes it to throw " You have attempted to
dereference a scalar variable of type class java.lang.String as a
structure with members."

The offending code lives in Coldbox.cfc around line 275
<cfset templateCache.set(eventCacheEntry.cacheKey,

This is what's happening:

  - onRequestCapture interceptor makes a cache suffix based on user's
session id
  - preProcess interceptor (security) directs users who are not logged
in to the login page
  - target page is a cached event (using session-based cache key)

1. attempt to access handler.mycachedevent
2. redirect to login page
3. login/authenticate
4. access handler.mycachedevent

... so far so good...

5. log out (removes user from session)
6. attempt to access handler.mycachedevent
7. weird: it lets you through (i.e. shows you the view for the cached
event, but will still successfully redirect to login for other non-
cached events)
8. if you then change the URL to add an extra parameter it will throw
the error described above. e.g. handler.mycachedevent&foo=bar

?fwreinit=1 sorts it out and things go back to normal.

Has anyone else experienced this? Am I doing something wrong?

I ran some debug on my security interceptor to get some info on the
first part of the issue. After the cacheable event has been cached,
the preProcess interceptor runs as it should and results in :

log.debug('authentication failed - redirect to login');

I see the log turn up in trace, but the override doesn't function - I
see the previously cached output. Changing this to
setNextEvent(instance.xehLoginFail) makes that part work. I looked
around for some better documentation as to the purpose of
overrideEvent but couldn't find anything descriptive. Happy that the
alternative works, but it'd be nice to understand it more fully.

This also sorts out (or bypasses) the error described where
eventCacheEntry is sent back as a string. Again - my knowledge is
limited, so any insights would be gratefully received!

Oobi I believe I fixed this on 3.5 beta can you try it?

Luis Majano
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Mobile: 909-248-3408


This is going to sound daft, but I don't use git enough to be
familiar. I tried getting 3.5 from github but it turns out what I
grabbed was 3.1 -- I couldn't see 3.5 beta listed anywhere there.
Could you point me in the right direction?