> Giacomo Pati wrote:
>
> On Thu, 5 Jul 2001, Vadim Gritsenko wrote:
>
> > Giacomo,
> >
> > Previously it was possible to cache results for request
> > such as "page?param=value1" and "page?param=value2"
> > independently.
> >
> > This change would effectively disable cache for such
> > kind of requests. :(
> >
> > PS:
> > Previously key was generated from string like:
> >     "systemid{param=value1}",
> > now it looks like:
> >     "systemidparam"
>
> Well, I thought this is the right way to specify keys. Maybe Carsten can
> enlight us more. Isn't it true that the genKey method should use the
> NAMEs to build the key whereas the validate method takes the values into
> account.
>
Here is the light....

No, honestly, I think you are right:

The key identifies all input used by the transformer apart from the sax
stream,
so I think the key should contain also the parameter names (if they are used
by the transformer).
Then the validity objects validate the values of the parameters.

Carsten

> Giacomo
>
> >
> > Vadim
> >
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 04, 2001 14:56
> > > To: [EMAIL PROTECTED]
> > > Subject: cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation
> > > TraxTransformer.java
> > >
> > >
> > > giacomo     01/07/04 11:56:15
> > >
> > >   Modified:    src/org/apache/cocoon/transformation Tag:
> cocoon_20_branch
> > >                         TraxTransformer.java
> > >   Log:
> > >   fixed getKey method
> > >
> > >   Revision  Changes    Path
> > >   No                   revision
> > >
> > >
> > >   No                   revision
> > >
> > >
> > >   1.15.2.5  +12 -5
> xml-cocoon2/src/org/apache/cocoon/transformation/TraxTransformer.java
> > >
> > >   Index: TraxTransformer.java
> > >   ===================================================================
> > >   RCS file:
> /home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/TraxTra
> nsformer.java,v
> > >   retrieving revision 1.15.2.4
> > >   retrieving revision 1.15.2.5
> > >   diff -u -u -r1.15.2.4 -r1.15.2.5
> > >   --- TraxTransformer.java        2001/06/28 09:58:24     1.15.2.4
> > >   +++ TraxTransformer.java        2001/07/04 18:56:14     1.15.2.5
> > >   @@ -17,6 +17,7 @@
> > >    import java.util.Iterator;
> > >    import java.util.Iterator;
> > >    import java.util.Map;
> > >   +import java.util.StringBuffer;
> > >    import javax.xml.transform.Templates;
> > >    import javax.xml.transform.TransformerConfigurationException;
> > >    import javax.xml.transform.TransformerFactory;
> > >   @@ -100,7 +101,7 @@
> > >     * @author <a href="mailto:[EMAIL PROTECTED]";>Davanum Srinivas</a>
> > >     * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten
> Ziegeler</a>
> > >     * @author <a href="mailto:[EMAIL PROTECTED]";>Giacomo Pati</a>
> > >   - * @version CVS $Id: TraxTransformer.java,v 1.15.2.4
> 2001/06/28 09:58:24 cziegeler Exp $
> > >   + * @version CVS $Id: TraxTransformer.java,v 1.15.2.5
> 2001/07/04 18:56:14 giacomo Exp $
> > >     */
> > >    public class TraxTransformer extends ContentHandlerWrapper
> > >    implements Transformer, Composable, Recyclable,
> Configurable, Cacheable, Disposable, URIResolver {
> > >   @@ -363,11 +364,17 @@
> > >                HashMap map = getLogicSheetParameters();
> > >                if (map == null) {
> > >                    return
> HashUtil.hash(this.inputSource.getSystemId());
> > >   -            } else {
> > >   -                return
> HashUtil.hash(this.inputSource.getSystemId() + map);
> > >   -            }        } else {
> > >   -            return 0;
> > >   +            }
> > >   +
> > >   +            StringBuffer sb = new StringBuffer();
> > >   +            sb.append(this.inputSource.getSystemId());
> > >   +            Object [] a = map.keySet().toArray();
> > >   +            for (int i = 0; i < a.length; i++) {
> > >   +                sb.append((String)a[i]);
> > >   +            }
> > >   +            return HashUtil.hash(sb.toString());
> > >            }
> > >   +        return 0;
> > >        }
> > >
> > >        /**
> > >
> > >
> > >
> > >
> > > ----------------------------------------------------------------------
> > > In case of troubles, e-mail:     [EMAIL PROTECTED]
> > > To unsubscribe, e-mail:          [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


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

Reply via email to