Bug #18270
closed
cannot clear extension's FE cache from Backend
Added by Franz Holzinger almost 17 years ago.
Updated about 16 years ago.
Description
I have tried all 3 new clear cache buttons. I am using the tt_board forum. I have made changes in the tt_board tables via phpMyAdmin. But the FE does not show the changes. So I assume that the cache for the extension has not been cleared.
When I log in as FE user or add the line &no_cache=1 to the URL, then everything works fine. The changes are shown in the FE. But after logging out or removing the no_cache?1, the old texts are shown in FE.
(issue imported from #M7612)
Files
Does this still exist on your system with lastest TYPO3 revision?
What exactly do you mean with "extension's FE cache"?
I can confirm this using the latest TYPO3 4.2 branch.
After using "Clear all cache" in the BE (and not using the FE after that), the following cache_* tables are empty:
- cache_hash
- cache_pages
- cache_pagesection
- cache_typo3temp_log
The following cache_* tables still contain data:
- cache_extensions
- cache_imagesizes
- cache_md5params
It turns out that in t3lib_TCEmain::clear_cacheCmd, the following loop is not executed for me because said array is no array:
// Clearing additional cache tables:
if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'])) {
foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'] as $tableName) {
if (!ereg('[^[:alnum:]_]',$tableName) && substr($tableName,-5)=='cache') {
$GLOBALS['TYPO3_DB']->exec_DELETEquery($tableName,'');
} else {
die('Fatal Error: Trying to flush table "'.$tableName.'" with "Clear All Cache"');
}
}
}
This bug is still present in TYPO3 4.2.RC2.
If I use tt_board and e.g. have the single view of a former post shown:
http://jambage.com/index.php?id=294&tt_board_uid=732&cHash=c3fa2668ee
Then I use the TYPO3 backend to change the topic from
'Version 0.2.0 transaction_getResults' to
'TEST Version 0.2.0 transaction_getResults'
Then I click 'clear all caches' in the TYPO3 backend. Then I reload the browser in the FE.
And there is still the old page with title 'Version 0.2.0 transaction_getResults' shown and not the TEST title. So obvisously the extension's FE cache cannot be deleted any more.
I can confirm this. This array is for extensions to "hook" into the clear_cache.
The three tables Oliver mentioned should be cleared in TCEmain as they are system tables, they shouldn't be in this array.
I attached a patch which does it.
After clearify in core list the patch is wrong and i removed it.
@Franz Koch - your behaviour has nothing to do with the clear cache - open phpmyadmin and clear cache to see that the tables are empty
For the other tables i cite Rupi for better understanding of the cache tables
clearing cache md5params would destroy ALL simStatic urls,
simFilenames and RDCT redirects.
clearing cache_extensions would make the extmanager unusable until a new
extlist is fetched from TER
and clearing cache_imagesizes would cause a lot of unneeded imagemagick
calls because the size informations have to be fetched again after clearing
@Steffen: When I click the button 'clear all caches' I want the FE cache to be cleared. The changed records should be shown immediately after this in FE. Otherwise the clear of cache is wrong.
This would be annother issue with the EM then. So why not fix this one?
The attached documentation patch does not fix the problem, but it documents why the three mentioned tables are must not be cleared when clearing all caches.
The fix was to clearify the caching behaviour and all side-effects in by adding comments to the code.
Also available in: Atom
PDF