[TYPO3-english] Cache issue with variables...
t3ng at pi-phi.tk
Thu Feb 23 09:14:12 CET 2012
On 02/23/2012 04:18 AM, Roberto Presedo wrote:
> I'm trying to use a "country" variable that will be used by TYPO3 in every
> links it will generate, as it does with the "L" variable for the language
> of a page.
> What I expect is the following : If I load a page like "
> www.mysite.com/?id=1&L=1&country=de", I want all links generated in that
> page to use "L" and "country" variables.
> for example the following page
> *will contain links like :
> To do so, I've set up the Ts config like this
> config.linkVars = L(0-5),country
> It works fine, as L and country are added to all links of my page.. but ..
> Let say I load the following url for the first time (cache previously
> *-> www.mysite.com/?id=1&L=1&country=de
> *will generates links with L=1&country=de as expected…
> If I switch language
> *-> www.mysite.com/?id=1&L=2&country=de
> *Links are generated as expected too (with L=2&country=de) … good
> But if I switch country instead of language,
> *-> www.mysite.com/?id=1&L=1&country=ch
> *then TYPO3 is going to check in the cache for the page requested (as
> usual), but will return the content of the first loaded country/language
> pair (www.mysite.com/?id=1&L=1&country=de) instead of create a brand new
> content, as the page as never been generated before.. So, the page returned
> contains links with "L=1&country=de" instead of "L=1&country=ch" and I
> loose the country=de information.
> How can I tell the cache framework to look after the "L" variable AND the
> "country" one too…
as georg wrote: the clean way is to use cHash and all url-parameters are
the 'old' variant:
caching depends on:
2. fe_usergroups of logged in user
so if you want to cache different values of country you can build in
conditions on these values. but be aware that other variables which
might lead to other pagecontent (like 'onemorevariable=xx') are still
ignored, which can be ok if the value is evaluated just in an uncached
More information about the TYPO3-english