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: Localization and caching
Date Sat, 08 Jul 2006 10:46:27 GMT

> 
> Hi everybody,
> 
>     We are writing a dynamic website with cocoon and with are 
> confronted 
> to some problems.
> We would like all the pages to be cached at startup for all possible 
> specified languages.  When the user change the locale, it should be 
> reflected in all the application's pages.

Hmmm, you are caching every possible page at startup?? With a crawler or something? Or you
mean only the homepages? Or all? How do you do all? And what if content changes? Do you have
to re-cache everything? It looks like you are working like the "forrest" guys. Cocoon has
many smart caching mechanism, like eventAware that make running live without warming up the
caches is very well possbile

> 
>     However the cache doesn't seem to be updated when the 
> locale change. 
> The same page is often returned and sometimes a page with the 
> previous 
> language settings.
> 
> 
> Were are using Cocoon 2.1.9 and the localeAction with 3 languages 
> (Spanish, English and trench). We were looking at the 
> CacheEventAction 
> but it doesn't seem to be the way to go.

I am not aware of waht the localeAction does. But I can imagine it is at the end of your pipeline,
right? And the localeAction does not implement CacheableProcessingComponent interface. So,
now, I have to quess what your problem is, but I have a clue:

You do some generation part, then some xsl transforms, and then a localeAction..(hope i got
it right)

And probably, the generation part and the xsl part is locale dependent. But, you dont use
the locale in there (as a parameter). So, this implies, your cache is built up until the first
not cacheable component...(I suppose, but am not sure, and have to sort it out if it remains
a problem, that this also holds for map:actions and map:selectors and stuff)

Anyway, so your cache is build with a generation part and some xsl transformer, where the
locale is not in it. Now, changing your locale will return the very same cache...solution:
do the xsl transformation with an extra map:parameter, with name="foo" and value equal to
the locale. You dont have to use this parameter in your xsl. It only makes sure, your cache
key contains the locale (look in StatusGenerator for generated keys: probably, you dont see
the locale in it)

Hope this helps you out,

Regards Ard

> 
>     If someone could help, it would be great. We are kind of 
> stuck with 
> Cocoon as it is considered as a show stopper for the project.
> 
> Thanks in advance
> 
> -- 
> 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


Mime
View raw message