Forum OpenACS Development: Re: Should we timout permissions cache?

Collapse
Posted by Peter Marklund on
Jeff,
you are right of course. I see now how caching permissions is really quite complex.

It may not be feasible to come up with a flushing scheme that will keep db and cache in sync at all times. However, I believe it is the case that permissions change very seldom. I also believe that for the majority of sites it is perfectly acceptable to have the cached permissions lag the db permissions by some time (say one or a couple of hours). If I'm not mistaken this approach was used by Don for both SloanSpace and Greenpeace.

How about adding another parameter for the timeout of the permissions cache? I don't know what the default value should be, maybe 60 minutes?

/Peter

Collapse
Posted by Dirk Gomez on
Peter,

A permissions cache would make most sense as long as you are "near" a certain object while surfing. I think I'm near an object for about 5 minutes  - maybe.

We are talking about a default value anyway right? A programmer can set a timeout of 60 minutes for a subsite index page which I am likely to hit way more often.

Make the default small.

-- Dirk