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,
renderedContent,
eventCacheEntry.timeout,
eventCacheEntry.lastAccessTimeout)>
This is what's happening:
Setup:
- 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?