Project

General

Profile

Actions

Bug #99821

closed

cache:warmup always recreates core code cache files even if they exist and the content will not change

Added by Sybille Peters about 1 year ago. Updated about 1 year ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2023-02-04
Due date:
% Done:

0%

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

Description

The file cache files are always recreated by the command cache:warmup - even if they already exist and there is no change:

php vendor/bin/typo3 cache:warmup

files have new time stamp, such as:

var/cache/code:

ls -l core/
total 6278
...  24260 Feb  4 10:10 BackendRoutes_2b542f5ab887ff8a73c2bf65e72aa3791d493b97.php
...    521 Feb  4 10:10 ExpressionLanguageProviders_2b542f5ab887ff8a73c2bf65e72aa3791d493b97.php
... 172105 Feb  4 10:10 ext_localconf_2b542f5ab887ff8a73c2bf65e72aa3791d493b97.php
..
ls -l di/
total 1730
... 1478664 Feb  4 10:10 DependencyInjectionContainer_2b542f5ab887ff8a73c2bf65e72aa3791d493b97.php

The system is fully warmed up so there is currently no need to recreate cache files. I am not sure if this has other effects if cache:warmup is not used but I have recently noticed a very large number of log messages like this:

Sat, 04 Feb 2023 08:41:20 +0100 [CRITICAL] request="33281b1d99c16" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": Core: Exception handler (WEB: BE): TYPO3\CMS\Core\Cache\Exception, code #1334756737, file /var/www/mysite/releases/106/public/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php, line 232: The temporary cache file "/var/www/mysite/releases/106/var/cache/code/di/63de0c2025346392264361.temp" could not be written. - {"mode":"WEB","application_mode":"BE","exception_class":"TYPO3\\CMS\\Core\\Cache\\Exception","exception_code":1334756737,"file":"/var/www/mysite/releases/106/public/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php","line":232,"message":"The temporary cache file \"/var/www/mysite/releases/106/var/cache/code/di/63de0c2025346392264361.temp\" could not be written.","request_url":"https://mysite/someurl","exception":null}

Versions

tested with

- latest main (v12)
- 11.5.22


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #91768: Race condition while caching data using SimpleFileBackendNew2020-07-08

Actions
Actions #1

Updated by Sybille Peters about 1 year ago

  • Related to Bug #91768: Race condition while caching data using SimpleFileBackend added
Actions #2

Updated by Benjamin Franzke about 1 year ago

  • Status changed from New to Rejected

cache:warmup recreates caches on purpose and by design.
cache:warmup is not designed to be executed like a cronjob on a timely basis, but ondemand (e.g during deployment or even development).

The system is fully warmed up so there is currently no need to recreate cache files.

Yea, so then you don't have a need to execute cache:warmup, right?

I am not sure if this has other effects if cache:warmup is not used but I have recently noticed a very large number of log messages like this:

The error you mention does not happen because of cache-file recreation per-se, it is a consequence of some stale file system caches or a race-condition.

Actions

Also available in: Atom PDF