[TYPO3-ect] tx_base - tslib_pibase modernized
Elmar Hinz
elmar.hinz at team.MINUS.red.DOT.net
Tue Apr 3 01:22:24 CEST 2007
>> 1.) pi_USER_INT_obj setting becomes obsolete. The most confusing setting.
>
> We need at least an internal replacement that can be generated by the
> kickstarter (with a better name of course). See below...
The boolean $noHash/$cHash is enough to swith the cHash on/off.
We don't need a replacement for pi_USER_INT_obj. There is nothing to
replace. It was always one of the most funny miracles in tslib_pibase that
I needed two settings to switch one parameter. We should eradicate it from
the kickstarter with base.
>
>> 2.) $pi_checkCHash should be set to TRUE by default (I see it's not
>> implemented yet.) So in doubt caching works simply by selecting USER.
>
> But won't this break a plugin specifically set to "USER_INT"? I think
It would not break. USER_INT is dynamic. It is not interested in the
question if there is a cHash or not.
You can checkout the extension cherries from SVN to test out details.
> having caching on by default will frustrate a beginner who will "ask
> google" and find the solution of "set_no_cache()", where auto-magically
> everything "works", which is then kept in his extension.
That is a different question: USER or USER_INT.
> My idea would be to have as little caching as possible (USER_INT by
> default) so that the beginner will see results without having to
> set_no_cache(). But then provide some "easy" ways to turn the script to
> a USER script. Or maybe have more information in the kickstarter near to
> checkbox where the user chooses "USER" or "USER_INT"?
Right. The user decides in the kickstarter himself. So there is no
default. But it is very important to tell him where he can switch between
USER and USER_INT.
>> 4.) The names are less cryptic.
>
> I wouldn't use negated boolean named flags like "noHash = FALSE", which
> is pretty cryptic. Maybe something more "speaking" as
> "isDestinationCached = TRUE".
Good suggestion.
> But this is also where the old "pi_USER_INT_obj" comes into play. The
> default for "isDestinationCached" should be FALSE if the user chose to
> build an USER_INT plugin in kickstarter and TRUE if he choses an USER
> plugin. So I see no way of getting "rid" of that setting, and maybe we
> could skip that parameter in the link generating functions, and use the
> default depending on the cObj type.
You forget that there are links to internal and external targets. Also
Kasper obviously has forgotten this, when he invented pi_USER_INT_obj.
http://t3flyers.wordpress.com/2006/09/11/a-quick-guide-to-correct-caching-with-pi_base/
With idea of pi_USER_INT_obj you barking up the wrong tree. You can't do
the switch globally. You need to do decide for each link again.
Simply use: isDestinationCached.
a) If you set it to true with a USER_INT: no problem but not pretty.
b) If you set it to true with a USER: fine.
c) If you set it to false with a USER_INT: fine.
d) If you set it to false with a USER: It falls back to the default cache.
Checkout cherries.
As you see d) is the only case that causes troubles. You would always get
the same output from the page. You would quickly set isDestinationCached
to true.
Regards
Elmar
More information about the TYPO3-team-extension-coordination
mailing list