[BUG] possibly causing MySQL Dead-Locks and/or unnecessary load on database-server
Bug Report
Current Behavior I noticed some issues with MySQL (MariaDB) dead-locks and found that StaticFileCache is possiby causing them in this line: https://github.com/lochmueller/staticfilecache/blob/21697e6b3ea3584995fefe9ab74615927a872744/Classes/Middleware/GenerateMiddleware.php#L81
StaticFileCache will even fire cache-entries with cache-lifetime 0 to database, which (as far as I see) is not required and may cause load on MySQL server for pages that have cache-restrictions preventing caching of the page.
Expected behavior/output StaticFileCache should only cache / generate cache database entries
Environment
- TYPO3 version(s): 11.5
- staticfilecache version: 13.1
- Is your TYPO3 installation set up with Composer (Composer Mode): yes
- OS: Ubuntu Linux
Possible Solution I made an extension extending staticfilecache GenerateMiddleware.php to test my own approach to solve this. see: https://gitlab.com/typoworx-gmbh/typo3/extensions/typo3-staticfilecache-extender/-/blob/main/Classes/Http/Middleware/GenerateMiddleware.php?ref_type=heads
Additional context --/--