http://forge.typo3.org/http://forge.typo3.org/themes/typo3_forge/favicon/favicon.png?17058661692007-11-29T14:43:17ZTYPO3 ForgeTYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464402007-11-29T14:43:17ZDmitry Dulepov
<ul></ul><p>cHash is supposed to have all vars in it by design. Otherwise cache will not work properly.</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464412007-11-30T11:59:57ZOliver Haderoliver.hader@typo3.org
<ul></ul><p>I ran into the same problem some months ago and created a "cHashTunnel" patch for my own purpose. It was configured in TS like this "config.cHashTunnel = tx_myext_pi2,tx_myotherext_pi1" (see attached patch just for comparison).</p>
Imagine the following situation:
<ul>
<li>Two plugins are on the same page</li>
<li>tx_myext_pi1 (USER)</li>
<li>tx_myext_pi2 (USER_INT)</li>
<li>now a link that keeps existing params of pi1 and adds new uncached params for pi2 is sent, e.g.<br />--> index.php?id=123&tx_myext_pi1[param]=first&tx_myext_pi2[param]=second&cHash=1234abcd<br />--> the calculated cHash value should only be against the USER plugins, thus agains pi1<br />--> the values for pi2 shall not modify the cHash, because only the content of USER_INT changes and should not be cached at all as new entry in the cache table</li>
</ul> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464422007-11-30T12:01:03ZOliver Haderoliver.hader@typo3.org
<ul></ul><p>The attached cHashTunnel patch is FYI and was created against some 4.1 version. So, let's talk about this and maybe merge things.</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464432007-11-30T16:26:53ZErnesto Baschnyeb@cron.eu
<ul></ul><p>Oliver, that sounds cool and I think it is very interesting addition to 4.2.</p>
<p>But it won't solve the problem when loading an *_INT that depends on a specific parameter from inside a USER object (e.g. rendering the "back link" like the original poster to this bug report did), because it seems to depend on the "prefixId" for deciding which parameters to ignore.</p>
<p>So couldn't we have it "more generic" in that we can set a list of additional GET parameters to ignore in cHash calculations? It seems that someone once thought about it, when adding "excludeCHashVars" class variable to tsfe (was there in 3.7 already!), but was this was never implemented.</p>
<p>Some TypoScript like</p>
<p>config.excludeCHashVars = tx_ttnews[backPid],tx_cal[page_id],tx_cal[last_view]</p>
<p>could configure that behaviour. Static templates of extensions could add more stuff to this variable if needed.</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464442007-11-30T18:30:29ZSteffen Kamperinfo@sk-typo3.de
<ul></ul><p>i discussed this with Dmitry, and conclusion was that you can't exclude piVars without having wrong cache entries.<br />e.g. eleminating the backpid cause that you get displayed a page with a wrong backlink (because it's cached once)</p>
<p>piVars from USER_INT shouldn't included by default. (or does they?)</p>
<p>i don't see a proper solution as the cached page really presents the combine of the piVars for the view.</p>
<p>The best solution anyway would be not to cache pages but objects, but this is a total new concept.</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464452007-11-30T19:14:59ZErnesto Baschnyeb@cron.eu
<ul></ul><blockquote>
<p>piVars from USER_INT shouldn't included by default.</p>
</blockquote>
<p>Steffen, this isn't possible, because TYPO3 currently has no way to get the list of "piVars from USER_INT". Which is why I proposed that every extension that makes use of them lists them (in TypoScript), so that those could be excluded from cHash calculation.</p>
<p>The problem with wrong cache entries won't arise, because only USER object are cached. The backlinks would be generated by an USER_INT, which would simple be a tag in the cache.</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464462007-11-30T20:03:43ZSteffen Kamperinfo@sk-typo3.de
<ul></ul><p>Yes, you're right with this. I thought about looking for pivars, eg tx_myext_pi1 -> USER or USER_INT, if USER, add it, but this may fail also if you use techniques with USER_INT in a USER-Extension. So the list of exclude make sense.</p>
<p>But don't forget the Users (or the devs) - they didn't knew in the past how to set up proper caching, do you think they will know how to decide which vars are excluded? Also in TS Admins may define vars and don't know what the result is. This could make it very difficult and may result in wrong caching.</p>
<p>With well knowledge this technique could be very helpful indeed.</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464472007-11-30T20:36:53ZErnesto Baschnyeb@cron.eu
<ul></ul><p>If some developer don't know how to set up proper caching I don't really care. There are enough resources to learn about it. If an admin doesn't understand some setting, it should be left alone. If a developer doesn't understand the concept, he should not use it. If he does, well, then it is not "our" fault, is it?</p>
<p>I care more about bringing in possibilities that are missing which developers with very well thought caching requirements need and which are not possible currently. This issue here is one of them, as the combination of USER and USER_INT on a same page (or even in one plugin) is a very important aspect for programming extensions that scale.</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=464482007-12-06T12:24:23ZNikolas Hagelsteinnikolas.hagelstein@gmail.com
<ul></ul><p>I made an extension implementing similar thing. <br /><a class="external" href="http://typo3.org/extensions/repository/view/nh_exclchashvars/0.0.2/">http://typo3.org/extensions/repository/view/nh_exclchashvars/0.0.2/</a></p>
<p>It works quite similar to olivers "hashtunnel" except for the fact that it enables you to exclude any parameter not just the "whole" prefix Id.</p>
<p>Just add something like : <br />$TYPO3_CONF_VARS['FE']['excludeCHashVars'][]= 'tx_nhasset_pi2[backPath]';<br />to your extensions localconf.</p>
<p>Oliver: the main problem about hiding a whole "prefix_id" from chash is, that a plugin could consist of a user/user_in swicht . In that case you may want to hide all parameters affecting the "user_int" part. (See my initial sample).<br />cheers,<br />NIkolas</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=1632412013-05-06T07:55:48ZAlexander Opitzopitz.alexander@googlemail.com
<ul><li><strong>Category</strong> deleted (<del><i>Communication</i></del>)</li><li><strong>Status</strong> changed from <i>New</i> to <i>Needs Feedback</i></li><li><strong>Target version</strong> deleted (<del><i>0</i></del>)</li></ul><p>As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?</p> TYPO3 Core - Feature #17862: Make excludeCHashVars workhttp://forge.typo3.org/issues/17862?journal_id=1815082013-09-09T08:42:51ZAlexander Opitzopitz.alexander@googlemail.com
<ul><li><strong>Status</strong> changed from <i>Needs Feedback</i> to <i>Closed</i></li></ul><p>No feedback for over 90 days.</p>