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 #1

Updated by Benni Mack about 2 years ago

  • Status changed from New to Needs Feedback

Hey Sven,

with TYPO3 v9 (and then v10 + v11) this was improved, also checking for the user. Can you confirm that v10+ solves this problem?

Actions #2

Updated by Sven Maciejewski about 2 years ago

It seems solved. (tested on v10.4.31).

Actions #3

Updated by Benni Mack about 2 years ago

  • Status changed from Needs Feedback to Closed

Thanks for the info. Will close this issue now.

Actions

Also available in: Atom PDF