Maybe two simple steps:
- introduce caching flag... compatible to earlier version.
But without guarantees...
- Introduce two flag interfaces:
SingleUsageTag: needs to be recreated at every run
StatefulTag: needs to be kept at every run
The value of the cache flag should be used for tags that implement
neither of them.
If people agree we would, then, slowly mark tags that we know need one
of the policies and people in an urge can apply SingleUsageTag to make
sure the former policy is used. Moreover, several of the unit-tests
should be run with and without setCacheTags.
How does it sound ?
paul
Le 27 juil. 05, à 03:22, Hans Gilde a écrit :
I'm with you on the idea that tags should always be cached and should
simply clear their state if desired. Either that, or they should never
be cached. We could even pass the state Map in to the execute method
along with the Context... or something like that. I'd say that the
next step is to put together the list of proposed API changes and hash
out where this is going
next.
-----Original Message-----
From: Paul Libbrecht [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 26, 2005 12:11 PM
To: Jakarta Commons Developers List
Subject: Re: [jelly] 1.0-final problem wrt tag caching
Le 24 juil. 05, à 23:33, Hans Gilde a écrit :
Got it, thanks. I was the one who accidentally removed isCacheTags(),
sorry.
By no means, I was the one and that is not so accidental.
(I remember somewhat warning about it)
Allow me to comment on the following, I think there's a deep issue
here!
Previous behavior was for each call to TagScript.run() to use a new
tag instance.
That is precisely a problem in several cases and tags should be "free
to choose this".
- I believe Swing's ActionTag cannot address its containing component
if the tag is gone away.
- I believe it is natural for the states of an http-client tag to be
stored in the tag and not need a variable for this (e.g. for cookies)
- I remember it was a problem in define-tags but cannot nail this down
correctly now.
I still believe that tags should, most of the time, be cached and would
rather encourage end-do-tags-like clear of beans for things where it
makes sense.
What does ant do ? I think it also caches them.
paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]