forked from Intera/typo3-extension-webkitpdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
22 lines (20 loc) · 1.3 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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// Unserializing the configuration so we can use it here
$_EXTCONF = unserialize($_EXTCONF);
/** @var string $_EXTKEY The current extension key. */
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['cacheLifetime'] = isset($_EXTCONF['cacheLifetime']) ? intval($_EXTCONF['cacheLifetime']) : 2592000;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['cacheLimit'] = isset($_EXTCONF['cacheLimit']) ? intval($_EXTCONF['cacheLimit']) : 0;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['debug'] = isset($_EXTCONF['debug']) ? boolval($_EXTCONF['debug']) : FALSE;
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['pdfCacheFolderIdentifier'] = isset($_EXTCONF['pdfCacheFolderIdentifier']) ? $_EXTCONF['pdfCacheFolderIdentifier'] : '0:/typo3temp/tx_webkitpdf/';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][\Tx\Webkitpdf\Utility\CacheManager::CACHE_IDENTIFIER] = array(
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\StringFrontend::class,
'backend' => \Tx\Webkitpdf\Utility\CacheDatabaseBackend::class,
'options' => array(
'defaultLifetime' => $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['cacheLifetime'],
'maximumNumberOfEntries' => $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$_EXTKEY]['cacheLimit'],
),
'groups' => array('pages', 'all')
);