|
--- ext_localconf.php 2011-03-04 14:31:20.000000000 +0100
|
|
+++ ext_localconf.php 2011-03-04 14:36:06.000000000 +0100
|
|
@@ -44,11 +44,16 @@
|
|
|
|
|
|
// caching framework configuration
|
|
-$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['backend'] = 't3lib_cache_backend_DbBackend';
|
|
-$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['options'] = array(
|
|
- 'cacheTable' => 'tt_news_cache',
|
|
- 'tagsTable' => 'tt_news_cache_tags'
|
|
-);
|
|
+if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache'])) {
|
|
+ $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache'] = array(
|
|
+ 'frontend' => 't3lib_cache_frontend_StringFrontend',
|
|
+ 'backend' => 't3lib_cache_backend_DbBackend',
|
|
+ 'options' => array(
|
|
+ 'cacheTable' => 'tt_news_cache',
|
|
+ 'tagsTable' => 'tt_news_cache_tags'
|
|
+ )
|
|
+ );
|
|
+}
|
|
|
|
// register news cache table for "clear all caches"
|
|
if ($confArr['cachingMode']=='normal') {
|
|
--- ext_tables.php 2011-03-04 14:36:25.000000000 +0100
|
|
+++ ext_tables.php 2011-03-04 18:27:12.000000000 +0100
|
|
@@ -267,6 +267,18 @@
|
|
// add folder icon
|
|
$ICON_TYPES['news'] = array('icon' => t3lib_extMgm::extRelPath($_EXTKEY).'res/gfx/ext_icon_ttnews_folder.gif');
|
|
|
|
+ if (TYPO3_UseCachingFramework) {
|
|
+ // register the cache in BE so it will be cleared with "clear all caches"
|
|
+ try {
|
|
+ $GLOBALS['typo3CacheFactory']->create(
|
|
+ 'tt_news_cache',
|
|
+ $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['frontend'],
|
|
+ $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['backend'],
|
|
+ $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['options']);
|
|
+ } catch (t3lib_cache_exception_DuplicateIdentifier $e) {
|
|
+ // do nothing, a tt_news_cache cache already exists
|
|
+ }
|
|
+ }
|
|
}
|
|
|
|
// register HTML template for the tt_news BackEnd Module
|
|
--- lib/class.tx_ttnews_cache.php 2011-03-04 14:33:24.000000000 +0100
|
|
+++ lib/class.tx_ttnews_cache.php 2011-03-04 14:34:04.000000000 +0100
|
|
@@ -85,7 +85,7 @@
|
|
try {
|
|
$GLOBALS['typo3CacheFactory']->create(
|
|
'tt_news_cache',
|
|
- 't3lib_cache_frontend_StringFrontend',
|
|
+ $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['frontend'],
|
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['backend'],
|
|
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tt_news_cache']['options']);
|
|
} catch (t3lib_cache_exception_DuplicateIdentifier $e) {
|