-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_localconf.php
109 lines (101 loc) · 4.42 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
/** @noinspection PhpFullyQualifiedNameUsageInspection */
/** @noinspection PhpMissingStrictTypesDeclarationInspection */
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// Hook into the data handler to clear the cache for related records.
// Make sure we are the first processor so that other processors handle the pages we added.
/** @uses \Tx\Cacheopt\CacheOptimizerDataHandler::dataHandlerClearPageCacheEval() */
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'])
&& is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'])
) {
array_unshift(
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'],
Tx\Cacheopt\CacheOptimizerDataHandler::class . '->dataHandlerClearPageCacheEval'
);
} else {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'][] =
Tx\Cacheopt\CacheOptimizerDataHandler::class . '->dataHandlerClearPageCacheEval';
}
if (TYPO3_MODE === 'FE' || defined('TX_CACHEOPT_FUNCTIONAL_TEST')) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['postInit']['tx_cacheopt']
= Tx\Cacheopt\TagCollector\ContentTagCollector::class;
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class
);
// Hook in every time a public URL is requested to collect file related cache tags.
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PreGeneratePublicUrl,
Tx\Cacheopt\TagCollector\FileTagCollector::class,
'collectTagsForPreGeneratePublicUrl'
);
}
// Hook into the file handling to clear the cache for related records.
/** @var \TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher */
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class
);
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileMove,
Tx\Cacheopt\CacheOptimizerFiles::class,
'handleFileMovePost'
);
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileDelete,
Tx\Cacheopt\CacheOptimizerFiles::class,
'handleFileDeletePost'
);
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileAdd,
Tx\Cacheopt\CacheOptimizerFiles::class,
'handleFileAddPost'
);
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileCreate,
Tx\Cacheopt\CacheOptimizerFiles::class,
'handleFileCreatePost'
);
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileCopy,
Tx\Cacheopt\CacheOptimizerFiles::class,
'handleFileCopyPost'
);
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileSetContents,
Tx\Cacheopt\CacheOptimizerFiles::class,
'handleFileSetContentsPost'
);
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileRename,
Tx\Cacheopt\CacheOptimizerFiles::class,
'handleFileRenamePost'
);
$signalSlotDispatcher->connect(
TYPO3\CMS\Core\Resource\ResourceStorage::class,
TYPO3\CMS\Core\Resource\ResourceStorage::SIGNAL_PostFileReplace,
Tx\Cacheopt\CacheOptimizerFiles::class,
'handleFileReplacePost'
);
$cacheOptimizerRegistry = Tx\Cacheopt\CacheOptimizerRegistry::getInstance();
// Default configuration for the cz_simple_cal Extension.
if (TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('cz_simple_cal')) {
$cacheOptimizerRegistry->registerPluginForTables(
[
'tx_czsimplecal_domain_model_address',
'tx_czsimplecal_domain_model_category',
'tx_czsimplecal_domain_model_event',
],
'czsimplecal_pi1'
);
}
unset($cacheOptimizerRegistry);