Skip to content

Commit

Permalink
[BUGFIX] disableNoCacheParameter option allows TypoScript cache option
Browse files Browse the repository at this point in the history
With this change applied, a TYPO3 installation having the
global "disableNoCacheParameter" option activated will
still disable the cache if set via TypoScript `config.no_cache = 1`.

However, the GET parameter is still not evaluated when
having the option activated.

Resolves: #87227
Releases: master, 9.5
Change-Id: Id33bd3aa9c8d042deffadeb19d8d64d52fad3371
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62905
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
  • Loading branch information
bmack authored and d3pendent committed Jan 15, 2020
1 parent 7e98402 commit 5e7759d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2692,7 +2692,7 @@ public function getConfigArray()
// No cache
// Set $this->no_cache TRUE if the config.no_cache value is set!
if ($this->config['config']['no_cache']) {
$this->set_no_cache('config.no_cache is set');
$this->set_no_cache('config.no_cache is set', true);
}
// Merge GET with defaultGetVars
// Please note that this code will get removed in TYPO3 v10.0 as it is done in the PSR-15 middleware.
Expand Down Expand Up @@ -4504,7 +4504,7 @@ public function set_no_cache($reason = '', $internal = false)
$trigger = $file . ' on line ' . $line;
$warning = '$GLOBALS[\'TSFE\']->set_no_cache() was triggered by ' . $trigger . '.';
}
if ($GLOBALS['TYPO3_CONF_VARS']['FE']['disableNoCacheParameter']) {
if (!$internal && $GLOBALS['TYPO3_CONF_VARS']['FE']['disableNoCacheParameter']) {
$warning .= ' However, $TYPO3_CONF_VARS[\'FE\'][\'disableNoCacheParameter\'] is set, so it will be ignored!';
$this->getTimeTracker()->setTSlogMessage($warning, 2);
} else {
Expand Down

0 comments on commit 5e7759d

Please sign in to comment.