Project

General

Profile

Actions

Bug #92145

closed

sendCacheHeaders() failed if frontenduser-session used

Added by Sven Maciejewski about 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2020-09-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController

in function sendCacheHeaders()

$doCache = $this->isStaticCacheble();

and in function isStaticCacheble()
comments
"There can be no logged in user because user sessions are based on a cookie and thereby does not offer client caching a chance to know if the user is logged in."

$doCache = !$this->no_cache && !$this->isINTincScript() && !$this->isUserOrGroupSet();

But "$this->isUserOrGroupSet()" doesn't check if the user is logged in.
Therefore the exist of any frontenduser-session set "isStaticCacheble()" to false and "sendCacheHeaders()" sends "Cache-Control: private, no-store".

imho the change from

$doCache = !$this->no_cache && !$this->isINTincScript() && !$this->isUserOrGroupSet();

to
$doCache = !$this->no_cache && !$this->isINTincScript() && !$this->loginUser;

can solve this problem.

Actions

Also available in: Atom PDF