Bug #89895

Streamline usage of caching API

Added by Helmut Hummel 3 months ago. Updated 10 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2019-12-07
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Use code cache properly instead of storing strings into it,
because it is proper usage of our API, removes the need
for stripping PHP code strings and improves performance
when Opcache is in use (which is recommended on production systems)

Additionally all calls to ->has are removed, except one place where
boolean values are stored in a runtime cache and in test,
because the API guarantees returning "false" when using ->get or ->require

Doing so reduces the amount of lookups on the backend storage (file_exists
for file backend, SQL queries for DB backend) and makes up more
straightforward code in most places (reduces cyclomatic complexity by removing
obsolete "else" branching.

Associated revisions

Revision 266bf67f (diff)
Added by Benni Mack 10 days ago

[TASK] Streamline usage of caching framework

Use code cache properly instead of storing strings into it,
because it is proper usage of our API, removes the need
for stripping PHP code strings and improves performance
when OPCache is in use (which is recommended on production systems).

Additionally all calls to ->has are removed, except one place where
boolean values are stored in a runtime cache and in tests,
because the API guarantees returning "false" when using ->get or ->require

Doing so reduces the amount of lookups on the backend storage (file_exists
for file backend, SQL queries for DB backend) and makes up more
straightforward code in most places (reduces cyclomatic complexity by removing obsolete "else" branching).

Releases: master
Resolves: #89895
Change-Id: I401512ad4ddffb622ce2f4a9d88274deb4b4e849
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62558
Tested-by: TYPO3com <>
Tested-by: Achim Fritz <>
Tested-by: Benni Mack <>
Reviewed-by: Achim Fritz <>
Reviewed-by: Benni Mack <>

History

#1 Updated by Gerrit Code Review 3 months ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62558

#2 Updated by Gerrit Code Review 3 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62558

#3 Updated by Gerrit Code Review 11 days ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62558

#4 Updated by Benni Mack 10 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF