Task #88366

Streamline caching framework caches

Added by Benni Mack 6 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Caching
Start date:
2019-05-15
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Sprint Focus:

Related issues

Related to TYPO3 Core - Bug #88512: Flaws in accessing deprecated caches starting with "cache_" Closed 2019-06-06

Associated revisions

Revision 828f4262 (diff)
Added by Benni Mack 6 months ago

[!!!][TASK] Streamline caching framework caches

Due to some heavy history on the caching framework, all
Database caches start with "cf_cache_", which is optimized
so they are only called e.g. "cache_pagesection" in the database tables.

In addition, the prefix "cache_" (in e.g. "cache_core") is unnecessary,
and also there due to legacy reasons, reading $this->getCache('cache_runtime')
seems very illogical.

The following caches have been renamed:
- cache_core => core
- cache_hash => hash
- cache_pages => pages
- cache_pagesection => pagesection
- cache_runtime => runtime
- cache_rootline => rootline
- cache_imagesizes => imagesizes

Old identifiers can still be called within PHP,
but the caching framework throws a deprecation message
on setting up such a cache.

A silent upgrade wizard will update one's LocalConfiguration
to use the new naming scheme.

The result is a cleaner, more readable and more streamlined
code base (we have caches like "extbase" or "assets" where
there is no prefix) and database structure.

The patch is breaking due to the change in the database tables.

Resolves: #88366
Releases: master
Change-Id: I13dcdb0d1bf78f0899615e850856de081b715358
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59661
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Benni Mack 6 months ago

Due to some heavy history on the caching framework, all
Database caches start with "cf_cache_", which is optimized
so they are only called e.g. "cache_pagesection" in the database tables.

In addition, the prefix "cache_" (in e.g. "cache_core") is unnecessary,
and also there due to legacy reasons, reading $this->getCache('cache_runtime')
seems very illogical.

Therefor the following caches have been renamed:
- cache_core => core
- cache_hash => hash
- cache_pages => pages
- cache_pagesection => pagesection
- cache_runtime => runtime
- cache_rootline => rootline
- cache_imagesizes => imagesizes

Old identifiers can still be called within PHP,
but the caching framework throws a deprecation message
on setting up such a cache.

#2 Updated by Gerrit Code Review 6 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/+/59661

#3 Updated by Gerrit Code Review 6 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/+/59661

#4 Updated by Gerrit Code Review 6 months 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/+/59661

#5 Updated by Gerrit Code Review 6 months ago

Patch set 5 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/+/59661

#6 Updated by Gerrit Code Review 6 months ago

Patch set 6 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/+/59661

#7 Updated by Benni Mack 6 months ago

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

#8 Updated by Oliver Hader 6 months ago

  • Related to Bug #88512: Flaws in accessing deprecated caches starting with "cache_" added

#9 Updated by Benni Mack 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF