Why not cache them?

On Sun, 20 Mar 2005 21:53:06 +0100, Micha Schopman
<[EMAIL PROTECTED]> wrote:
> I have a treeview where each node has a permission set, similair like NT
> Security. If a node doesn't have permissions set, they are inherited from
> the first parent in the "bloodline" who has permissions. ( 
> http://c2.com/cgi/wiki?ChainOfResponsibilityPattern) 
>   
> When I expand a level in the treeview, the following happens. 
>   
> - Childs are retrieved from the database (many to many relationships) 
> - Each child's permission set is retrieved, if no permissions have been set,
> this lookup continues untill the system found a parentnode with permissions.
>   
> The problem is the 2nd step. This step executes in a few milliseconds, but
> once you execute 100 database calls to check for the permissions of each
> child, you might imagine the delays grow with every lookup. The queries have
> been optimized already, and run under 1ms but it is the amount of queries in
> combination with the extensive model causing delays. 
>   
> I was hoping for people with similair issues when working with permission
> sets on objects. Did you find a way to improve lookups for those
> permissions? 
>   
> I figured out some options: 
> - lazy loading, but even then it takes at least one request to create the
> cache. 
> - a quick lookup table, specifically for lookup actions. Side effects are
> that you need some extensive queries and logic to update these tables on
> each change in permissions, groups, roles, policies, departments, and users.
>   ---------------------------------------------------------- You are
> subscribed to cfcdev. To unsubscribe, send an email to [email protected]
> with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is
> run by CFCZone (www.cfczone.org) and supported by CFXHosting
> (www.cfxhosting.com). An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]

Reply via email to