[Typo3-dev] Caching Problems

Jan-Erik Revsbech jer at moccompany.com
Wed May 19 10:55:44 CEST 2004


Actually there is a solution, if make a link with $this->cObj->typolink then
just make sure that the parameter useCacheHash is set. This will make typo3
render a cache-hash, and making a different cache for each combination of
you parameters.

Example:
I want to link to the page with id 203 and set trackAnchor to 13

$this->cObj->typolink('A link to page with id
203',array("useCacheHash"=>1,parameter=203,"no_cache"=>0,"additionalParams"=
"&trackAnchor=13"));

This will do the trick for you, one cache and one indexed page for each set
of parameters (one for trackAnchoe=12 and one for trackAnchor=13). Just
setting no_cache=1 will not cache the page, and hence not make it indexable
either.

There is a similar way to make it if you are using the link function of
pibase (but I cant remember it just now). But remember to *ALWAYS* use typo3
provided funtions for linking (typolink, typolink_URL,pibase->pi_linkTP
etc.) and do not hardcode links like

$content = '<a href="index.php?id=203&trackAnchor=1">My linktext</a>';

This i a very bad way of doing it.

/Jan-Erik

"Christian Kier" <kier at gmx.de> skrev i en meddelelse
news:mailman.1.1084956021.25554.typo3-dev at lists.netfielders.de...
> Thomas Roediger wrote:
> > So how can I change this behavior? Ok I could disable caching, but this
> > is not the solution. Is there a way to add my personal parameter the
> > cache-key, so that ?trackAnchor=12 is a different page to
?trackAnchor=13
>
> Just for the records:
> A workaround seems to be to pass "&no_cache=1" when you want your
> parameters considered. This way it is not necessary to disable caching
> for the page when the plugin is not used.
>
> /Christian






More information about the TYPO3-dev mailing list