On Lun, 30 de Mayo de 2005, 4:54, Sylvain Wallez dijo: > Antonio Gallardo wrote: >>THE SOLUTION >>============ >> >>We found is posible to improve DSL performance by caching the DSL item >>data list once per request. The DSL remains dynamic per request. >> >>Caching DSL will not affect the current behaviour. The time for DSL >>generation will be reduced substancially. >> >>Our proposed solution is add a new user defined attribute, called "cache" >>in <fd:selection-list>. This way the cform user can decide when he wants >>to use a cached DSL or not. For SSL this attribute has no meaning. >> >>Posible values for @cache: >> >>true - Cache SL content per request. >>false - No Cache SL content. >> >>default value: false. >> >> > > I'm wondering about the "cache" name which says nothing about the cache > duration, which is here the request. If we consider the behaviour of > dynamic="false", we can consider it as equivalent to cache="static" > (i.e. load once and never refresh). > > So IMO we should be deprecating dynamic="true" in favor of > cache="static|request".
IMHO in a DSL a "static cache" has no sense. Perhaps we can define: request-cache="yes|no" for DSL. And this is more explicit. I don't like this attribute is very implementation oriented. People will need to rewrite all the forms in order to take advantage of that. Well, it is very easy using jEdit...but... I think it is not too much dificult (and almost no time consuming) search ancestors looking for a Repeater. Perhaps better is: request-cache="auto|yes|no" When the user don't this attribute in definition.xml it means he want a SSL, right? Wich will be the default behavior using: myWidget.setSelectionList(...); Here we cannot define the cache. I thought we can create a new method: myWidget.setCachedSelectionList(...); The more I think about this, I am more thinking the best is to make this automatically and let cocoon decide when use the cache or not. Another question: How to access the request attributes from DynamicSelectionList.java without touching another file? I cannot see how to get the FormContext from the DSL code. BTW, The code is almost done. Best Regards, Antonio Gallardo.