[TYPO3-english] Disable caching of a plugin

Simon Strandgaard neoneye at gmail.com
Mon Apr 19 14:56:20 CEST 2010


On Mon, Apr 19, 2010 at 1:40 PM, Dmitry Dulepov <dmitry.dulepov at gmail.com>wrote:

> Simon Strandgaard wrote:
> > I have tried changing addPItoST43's the last argument from 1 to 0
> > t3lib_extMgm::addPItoST43($_EXTKEY, 'pi1/class.tx_myext_pi1.php', '_pi1',
> > 'list_type', 0);
> > Then it's no longer cached and the generated html is good...
> >
> > Except that it doesn't quite work.
> >
> > The function addJsFile() no longer inserts any link to the javascript
> file.
> > The function setJS() no longer inserts any inline javascript.
> > The function addCssFile() no longer inserts any link to css file.
> >
> > How to disable caching and still get javascript inserted?
>
> At that point all <head> is already generated, so you cannot do that
> easily..




I have found a combination that seems to work. Is it good?

/*
in ext_localconf.php
*/
t3lib_extMgm::addPItoST43($_EXTKEY, 'pi1/class.tx_myext_pi1.php', '_pi1',
'list_type', 1);


/*
in class top
*/
// var $pi_checkCHash = true;


/*
in main()
*/
$this->pi_USER_INT_obj = 1;  // Disable caching
$GLOBALS["TSFE"]->set_no_cache();



-- 
Best regards
Simon Strandgaard


More information about the TYPO3-english mailing list