cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <>
Subject RE: [RT]: Calculating the cache key
Date Thu, 23 May 2002 12:38:19 GMT
> From: Geoff Howard [] 
> Regarding compound integer keys...
> Berin wrote-
> > Consider a compound key that has an int for each part.  
> That integer 
> > is made up of the top half marking the component ID (there will be 
> > less than 65,536 unique types of components), and the unique entry 
> > within that component (another 65,536 entries).  We can shift the 
> > balance as necessary, but keep up.  A compound key has one part for 
> > each component that is part of the pipeline.  Something like this:
> > 
> > p[0]=fe01b342 { FileGenerator, resource="hello.xml" } 
> p[1]=fb021431 { 
> > XSLTTransformer, resource="layout.xsl" } p[2]=fb02542e { 
> > XSLTTransformer, resource="skin.xsl" } p[3]=fc010000 { 
> HtmlSerializer 
> > }
> 1) I just got that you are proposing a collection of compound 
> keys -- compound meaning a bit mask/shift combination of two 
> shorts into a compound long.  How would this work for aggregators?

No, actually, I was suggesting an array of ints (or longs).  Each
component has a unique ID, and that component can manage the ids it
needs to worry about.

> 2) Who would create and who would hold these keys?

That is a good question.  Either the components themselves, because
of the possibility of cache coherency depending on individual
Or the sitemap does it.  If the sitemap does it, or the pipeline does
it--then we need to expose the dependencies on parameter values.

> 3) Does each element need to keep track of all previous 
> elements (as in your example I think), or only the one 
> immediately preceding it?  If the serializer depends only on 
> the transform before it, would it be smarter to only 
> reference that, and then ask that what it depends on?

Each element only needs to take care of itself.  The compound key
(or array of ints) is merged into a hashcode, for quick checking.
The equality checking is dependant on the actual values in the

To unsubscribe, e-mail:
For additional commands, email:

View raw message