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 15:41:18 GMT

> Hello again,
> 

> <line>PK_G-file-file:/C:/logi/tomcat/webapps/ROOT/index.html_T
> -i18n-traductions/index?en___S-xhtml-;doctype-public=-//W3C//DTD
>                         XHTML 1.0

Here I see that you generated an index.html, did an i18n transformation, with the translation
file at traductions/index (I think?? ) and the locale was en (see ?en), after which you serialized
the pipeline as XHTML. 

So I guess you ran with the locale "en" the first time. 

Do you actually get a request on cocoon the second time in your browser? The above looks fine!
Probably, you get a 304 or something back from cocoon in case of caching pipeline (perhaps
in combination with your session, i don't know). Try to ctrl-f5 in your browser. Make sure
the request gets to cocoon (look in request log or something). Look at the headers in you
browser request (httpheaders for ie, or, hmm, forgot the one in mozilla). 

Etc etc. The only thing I can see from this cachekey line is that it works like it should

Regards Ard

> 
> Strict//EN;doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtm
> l1-strict.dtd;encoding=UTF-8
>                         (class:
> org.apache.cocoon.caching.CachedResponse)</line>
>                 </value>
>                 <value name="size">
>                     <line>1 items in cache (0 are empty)</line>
>                 </value>
>             </group>
>         </group>
>     </group>
> 
> 
> Thanks 
> 
> 
> On Tue, 2006-07-18 at 15:59 +0200, Ard Schrijvers wrote:
> > 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
> >         
> -- 
> 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
> 
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message