cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Problem with cache
Date Tue, 18 Jul 2006 13:59:31 GMT
Aaah, ok, did not understand that you wanted to have the locale in session, and not from browser
header.  You still have the problem with respect to caching, right?
 
Do you also have the problem when you change in the i18n transformer the map:parameter name="locale"
by hand?
 
just do a request with 

<map:transform type = "i18n">
 <map:parameter name ="locale" value ="en"/>
</map:transform>

then change it into 
 
<map:transform type = "i18n">
 <map:parameter name ="locale" value ="fr"/>
</map:transform> 
 
Now, does this work in a caching pipeline? If it does not, then look at the StatusGenerator
which keys are created. 
 
If it does work, then my guess is that when you do 
 
<map:transform type = "i18n">
 <map:parameter name ="locale" value ="{session-attr:locale}"/>
</map:transform>
 
your session is not correct
 
Regards Ard 


Hi again Ard,

According to the documentation of Apache Cocoon, I canhange the value of the parameter use-locale
to false . beacause this parameter aallows tococon to use the locale from the browsers headers.
Which which edon't want in this case. We set the default value to french Canada. And if the
user chooses a locale. whe want to keep it in the session. 

Here is an exceprt of the documentation of the localeAction which I seem to understand. at
least a little bit. 

----------------------------
   <map:action name="locale" src="org.apache.cocoon.acting.LocaleAction">
     <locale-attribute>locale</locale-attribute> 
     <use-locale>true</use-locale>

     <default-locale language="en" country="US"/>

     <store-in-request>false<store-in-request>

     <create-session>false<create-session>

     <store-in-session>false<store-in-session>

     <store-in-cookie>false<store-in-cookie>

   </map:action>

 

Above configuration parameters mean: 



*	locale-attribute specifies the name of the request parameter / session attribute / cookie
that is to be used as a locale (defaults to locale) 

*	use-locale specifies whether the primary locale provided by the user agent (or server default,
is no locale passed by the agent) is to be used 

*	default-locale specifies the default locale to be used when none found. 

*	store-in-request specifies whether found locale should be stored as request attribute. 

*	create-session specifies whether session should be created when storing found locale as
session attribute. 

*	store-in-session specifies whether found locale should be stored as session attribute. 

*	store-in-cookie specifies whether found locale should be stored as cookie. 

----------------------------

Is there something I am missing?

Thanks. 
On Tue, 2006-07-18 at 10:22 +0200, Ard Schrijvers wrote: 

You can set your pipeline type="noncaching". 



Though, cocoon comes with build in cache which should just work. I don't consider changing
to noncaching pipelines is a good solution.



Ard



> 

> Hi,

> Sorry I dont speak english very well.

> 

>  I have:

> cocoon-2.1.6

> tomcat-5.0.27-rc6

> 

> Everything is ok. I generate XML to  PDF . But if i change 

> something  in 

> my sample  document and if i try generate document again I 

> get it from 

> some cache system or database. Ofcorse if i change name and generate 

> document again everything is ok.  I must generate many  

> invoice (nearly 

> 4 thousands !!) and i can't change this name. I must off this cache 

> system. Oh i'm read about caching system on cocoon but still 

> i dont know 

> how i can off it.

> 

> Greetings

> Mariusz Derela

> 

> ---------------------------------------------------------------------

> To unsubscribe, e-mail:  users-unsubscribe@cocoon.apache.org

> For additional commands, e-mail:  users-help@cocoon.apache.org

> 

> 



---------------------------------------------------------------------

To unsubscribe, e-mail:  users-unsubscribe@cocoon.apache.org

For additional commands, e-mail:  users-help@cocoon.apache.org




-- 

Yves Zoundi

Analyste de l'informatique

Section recherche et développements numériques

Direction de la Bibliothèque de l'Université Laval

Pavillon Jean-Charles-Bonenfant, local 3137

Téléphone : (418) 656 2131, 13249




Mime
View raw message