Hello.

I have two questions dealing with the caching process
in Cocoon.

1. I want to refer to an internal Pipeline as the XML
source of other pipelines without aggregating it or
calling it as a resource (because it would never
return). The only trick I know is to make the internal
Pipeline the source of a File Generator.
Let's say my internal Pipeline is matching any URI
ending with "data.xml". What I want to do in my
external pipelines is :

<map:pipeline>
<!-- Internal Pipeline -->
<map:match pattern="data.xml">
 <map:generate src="dummy.xml"/>
 <map:serialize/>
</map:match>

<!-- First external Pipeline -->
<map:match pattern="External1.xml">
 <map:generate type="file" src="cocoon:/data.xml"/>
 <map:transform src="external1.xsl"/>
 <map:serialize/>
</map:match>

<!-- Second external Pipeline -->
<map:match pattern="External2.xml">
 <map:generate type="file" src="cocoon:/data.xml"/>
 <map:transform src="external2.xsl"/>
 <map:serialize/>
</map:match>
</map:pipeline>

This works fine : I have the content of data.xml
displayed with two different stylesheets depending on
the URI I've sent("External1.xml" or "External2.xml").

Some problems appear when caching content. If my
internal Pipeline is cacheable, its content is
generated two times : one time per external URI. The
reason is that the SystemID created for the internal
Pipeline depends on the RequestURI, which is
effectively different, not the protocol URI
(cocoon:/data.xml) which is the same.
Is there another way to achieve this without
aggregating or using the FileGenerator ?

2. My second question deals with Hashing algorithm
provided in HashUtils class. I have read that it was
efficient when key length was lower than 64 bytes. So
if a String key exceeding 64 bytes is hashed, how can
I be sure that it won't be the same as another one
representing another request ? How could I know that
the key will be trully unique ?

Thanks for advance.

David LAGARDERE

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to