[TYPO3-dev] User/User_int - Same Plugin twice in ext?

Stefan Geith typo3dev2006 at geithware.de
Mon Dec 4 12:46:41 CET 2006


Hi Devs,

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)
(Yes, I have seen the JoH's 'COA_INT in extension' Articel,
it could be done this way also ...)

Question 1:
Would it be theoretically possible to use
the same php-File for both plugins ?

I mean to set this to localconf.php:
t3lib_extMgm::addPItoST43($_EXTKEY,'pi/class.tx_myext.php','_pi1','list_type',1);
t3lib_extMgm::addPItoST43($_EXTKEY,'pi/class.tx_myext.php','_pi2','list_type',0);

and this in ext_tables.php:
t3lib_extMgm::addPlugin(array('Uncached',$_EXTKEY.'_pi1'),'list_type');
t3lib_extMgm::addPlugin(array('Cached',$_EXTKEY.'_pi2'),'list_type');


Question 2: Will the class-php-file be included once or twice ?


Question 3: Does it make sense ?


Example: A searchform could be cached, if it is always an empty form.
But it must be uncached, if I want to preset the last search of
the fe-user.
So depending on the configuration of the search mode, the be-user
can/must decide, whether he can use the cached-verion of the
plugin or the uncached ...



-

Stefan












More information about the TYPO3-dev mailing list