[TYPO3-english] Disable caching of a plugin

Simon Strandgaard neoneye at gmail.com
Tue Apr 20 10:30:08 CEST 2010


On Tue, Apr 20, 2010 at 9:25 AM, Dmitry Dulepov <dmitry.dulepov at gmail.com>wrote:

> Simon Strandgaard wrote:
> > I have found a combination that seems to work. Is it good?
>
> How to tell you... It is approximately like trying to repair glasses with a
> hummer


ouch.. ok

Ok, I have followed your advices.. is it better this time?


In "ext_localconf.php" I now have
t3lib_extMgm::addPItoST43($_EXTKEY, 'pi1/class.tx_myext_pi1.php', '_pi1',
'list_type', 0);


In top of "ext_tables.php" I have inserted an addStaticFile
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}

t3lib_extMgm::addStaticFile($_EXTKEY, 'tsconfig/', 'MyExt Setup');



In "tsconfig/" I have made a "setup.txt" containing this
page {
includeCSS {
 0 = EXT:myext/res/mystyle.css
}
 includeJS {
0 = EXT:myext/res/myscript.js
}
}


In top of my plugin class I have
// var $pi_checkCHash = true;


In top of main() I now have this code
$this->pi_USER_INT_obj = 1;  // Disable caching
// $GLOBALS["TSFE"]->set_no_cache();



Via the TYPO3 backend in the main template I have included the 'MyExt Setup'
static file.
Can this last step be avoided?


Can it be simplified further?



-- 
Best regards
Simon Strandgaard


More information about the TYPO3-english mailing list