[TYPO3-dev] User/User_int - Same Plugin twice in ext?
Stefan Geith
typo3dev2006 at geithware.de
Thu Dec 7 14:18:35 CET 2006
Peter Niederlag schrieb:
> Hello,
>
>> Stefan Geith schrieb:
>> If I understand caching right, then I have to
>> create always two plugins within my extension
>> to enable caching where possible:
>> - one plugin (e.g. _pi1) as USER_INT, that does
>> uncached things (e.g. resutlists, search forms etc.)
>> - one plugin (e.g. _pi2) as USER, that does
>> cached output (e.g. details-view)
>> Question 1:
>> Would it be theoretically possible to use
>> the same php-File for both plugins ?
>>
>>
>> Question 3: Does it make sense ?
>
> IMO: yes, definitly! It would be a nice solution for a common problem. I
> am not 100% about if it is working because we also need to obay some
> internal parameters (generation of cHash parameter)
>
> The "all best way" would be for the class to decide itself at runtime
> wether it should be _INT or not. I think we had a proposal for a new
> USER-object some time ago, that didn't make it to the core. ;(
Yes, this would be the best way!
The plugin itself should know exatly, whether it is cachable or not ...
As I have seen in the core, it is first checked, whether a plugin
is USER or USER_INT and than it is called to create its output.
It would be nice to have some kind of USER_EXT (?) that first
calls the plugin and thgen decides on some return-value if
this has to be cached.
Is there a chance to get something like that in 4.1 ?
-
Stefan
> [...]
>
> If the day just had an extra 23 hours. ;)
>
> Cheers,
> Peter
-
Stefan
More information about the TYPO3-dev
mailing list