-
Notifications
You must be signed in to change notification settings - Fork 11
/
ext_localconf.php
executable file
·24 lines (20 loc) · 1.15 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
<?php
defined('TYPO3') or die();
use B13\Proxycachemanager\ProxyConfiguration;
use TYPO3\CMS\Core\Utility\GeneralUtility;
if (empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_proxy'] ?? null)) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['tx_proxy'] = [
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
'backend' => \B13\Proxycachemanager\Cache\Backend\ReverseProxyCacheBackend::class,
'options' => [
'defaultLifetime' => 0, // @todo: should be not "infinite" but rather set to whatever the proxy settings are
'reverseProxyProvider' => (GeneralUtility::makeInstance(ProxyConfiguration::class))->getProxyProvider(),
],
// setting the pages group makes sure that when the page cache is cleared, that this cache is cleared as well
'groups' => ['pages', 'proxy'],
];
}
// Hook for adding any cacheable frontend URL to our proxy cache
// v11 only
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['insertPageIncache']['tx_proxycachemanager'] =
\B13\Proxycachemanager\Hook\FrontendHook::class;