cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wayne Bayever" <>
Subject [C1][Patch] Resolves 2 caching issues
Date Wed, 17 Jan 2001 05:19:34 GMT
I finally finished testing the patch on Tomcat, Resin and JServ!

Attached are fixes to and which solve the following issues:

1.  Caching doesn't work properly when XML file is included in JSP or servlet.  Before the
fix, Cocoon was caching based on the requested URI and query string, not the included URI
and query string.  So, if you passed dynamically generated parameters into the XML file from
JSP/servlet, Cocoon didn't realize that the request had changed and the cached version was
sent.  Also, if 2 different XML files were included in the same JSP/servlet, the first XML
file was sent twice.
With the fix, the included URI and all parameters are used in the cache key.
(Note, I moved the isValidName() method to Utils.isValidParamName())
(See more detailed discussion with subject: Caching issues around 1/10/2000)

2. While testing the fix for problem 1, I came across another problem.  The files were being
cached correctly, but the XSLT processor was reporting that the XSL file had changed, thus
invalidating the cache.  This was because the monitor key that was being used was generated
by Utils.encode() which includes query string info in the key.  Then, when the query string
changed, the monitor couldn't find the key and reported the file as changed.
With the fix, the monitor key is generated with Utils.encode(req, false, false, false) which
only uses (protocol)://(server)/requestedXMLPage as the key.  Thus, a change in query string
doesn't matter.

I generated these diffs with cvs diff -u.  Please let me know if there is something wrong
with them and I should regenerate them.


View raw message