History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: FC-1610
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Matthew Bryant
Reporter: Michael Sharman
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
FarCry Core Framework

getCurrentRoles() not using internal cache

Created: 19/Nov/08 04:17 PM   Updated: 16/Dec/08 01:02 PM
Component/s: Security
Affects Version/s: 5.0.2
Fix Version/s: FarCry 5.1

Time Tracking:
Not Specified

Environment:
Mac OSX 10.5
FarCry core 5.0.2


 Description  « Hide
It seems that calls to getCurrentRoles() in /farcry/core/packages/security/security.cfc are not using the internal class cache which is possibly causing too many database queries.

Current code:
<cfreturn application.factory.oUtils.listMerge(this.factory.role.getDefaultRoles(),session.security.roles) />

Possible future code:
<cfreturn application.factory.oUtils.listMerge(this.cache.defaultroles,session.security.roles) />

Note that "this.cache.defaultroles" is set in initCache() which is in turn called from init()

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Matthew Bryant - 16/Dec/08 01:02 PM
Updated. Nice find, thank you Michael.