#27536Caching framework db backend: Use own namespace
Description
This patch refactores the caching framework database backend in a way that its table layout must not be defined in core and extensions anymore.
This gives us a solution to change the table layout however we want.
The former mandatory ‘cacheTable’ and ‘tagsTable’ options are obsolete now, the table names depend on the cache identifier name (which is unique).
All tables are named cachingframework_’identifier’ and cachingframework_’identifier’_tags now. They must not be defined in ext_tables.sql anymore and are created by the database backend during flush() (which is called by ‘clear-all-cache’ for every update since #27506).
This patch is fully backards compatible since the ‘old’ table namespace of extensions is simply not used anymore. Patches to clean up the system extensions extbase and workspaces will follow.
The changes made it necessary to refactor the database backend unit tests as well, all tests were abstracted a bit more and new tests added.
The layout of needed database tables for cache tables is
handled by the caching framework backend internally:
- Extensions using db backend must not define tables in ext_tables.sql anymore
- Updates to table layouts can be handled by the backend itself
- Defining data and tags table in cacheConfigurations is obsolete
- Cache tables start with ‘cachingframework_’ and are ignored in install tool
- Table handling is fully backwards compatible
Reviews 1
Related issues 6
- Feature #20500Change the DB backend to use a default cache table
- Bug #22835dbbackendtestcase manipulates $GLOBALS['EXEC_TIME'] but doesn't reconstruct original value
- Bug #27671Caching framework: Reduce code duplication in db backend
- Bug #27543Adapt cache configuration to 4.6
- Bug #25119performace of cachingframework
- Bug #27548Caching framework db backend: Remove wildcard tag dropping