Project

General

Profile

Actions

Bug #98126

closed

Page caching does not work as expected on multi language sites

Added by Manfred Egger almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Caching
Target version:
-
Start date:
2022-08-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
performance
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

I would expect that as soon as a page is cached it's cached content is served to all clients. But if you have a multi language site and any client changes to a different language, the cached version isn't served anymore.

Steps to reproduce:
  • Create a new TYPO3 installation and install the introduction package
  • Enable HTTP debug headers via config.debug = 1
  • Set config.cache_period = 86400
  • On the "home page" (HP) "Congratulations" create a new page translation
  • Open the HP - cache is created
  • Press F5 - cached page is served
  • change to page "Features" - cache is created
  • change to HP - cached page is served
  • switch to translated page - cache is created
  • Press F5 - cached page is served
  • switch back to HP in default language - cache is created instead of serving the cached page
  • switch to translated page - cache is created instead of serving the cached page

Here's an example curl output (all caches were cleared before, a translation for german was created for the HP):

# Setting base domain without leading slash
$ DOMAIN="https://www.example.com" 

# Do some calls to default language
$ curl -v "${BASE}/" 2>&1 | grep x-typo3-debug-cache
# empty result as page is not cached
$ curl -v "${BASE}/" 2>&1 | grep x-typo3-debug-cache
< x-typo3-debug-cache: Cached page generated 12-08-22 08:52. Expires 13-08-22 08:52

$ curl -v "${BASE}/features" 2>&1 | grep x-typo3-debug-cache
# empty result as page is not cached
$ curl -v "${BASE}/features" 2>&1 | grep x-typo3-debug-cache
< x-typo3-debug-cache: Cached page generated 12-08-22 08:56. Expires 13-08-22 08:56

$ curl -v "${BASE}/" 2>&1 | grep x-typo3-debug-cache        
< x-typo3-debug-cache: Cached page generated 12-08-22 08:55. Expires 13-08-22 08:55

# switch to language de
$ curl -v "${BASE}/de/" 2>&1 | grep x-typo3-debug-cache
# empty result as page is not cached
$ curl -v "${BASE}/de/" 2>&1 | grep x-typo3-debug-cache
< x-typo3-debug-cache: Cached page generated 12-08-22 08:58. Expires 13-08-22 08:58

# switch back to default language
$ curl -v "${BASE}/" 2>&1 | grep x-typo3-debug-cache
# empty result but why? Shouldn't the page be in the cache?

Do I get something wrong?


Files

verify-curl-calls.sh (7.21 KB) verify-curl-calls.sh Stefan Bürk, 2022-11-28 21:23
test_typo3_page_cache_issue_98126.sh (967 Bytes) test_typo3_page_cache_issue_98126.sh Sybille Peters, 2022-12-05 11:05

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #23736: Condition with globalVar TSFE does not care about page language overlayClosedBenni Mack2010-10-15

Actions
Actions

Also available in: Atom PDF