Feature #22836
closedCaching framework: Implement PDO backend
0%
Description
FLOW3 added a PDO based cache backend since it's last backported revision. This enables to use different DBMS like sqlite as cache backend.
This patch ports this backend to v4.
Important implementation details:
- A new PDO helper class is added as t3lib_PdoHelper
- A db structure for a backend instance is added in t3lib/cache/backend/resources/ddl.sql
Differences to FLOW3:
- Additional unit tests for collectGarbage() (will be reported to FLOW3)
- Addeed methods and tests for flushByTags() and findIdentifiersByTags(), they are required in v4. The methods are currently pretty stupid and should be improved later on
- Several adaptions for v4: The initializeObject() method is gone, work is done in __construct(). This is in line with the other backend implementations
Status:
- Works for me. There are still some possible improvements but we can tackle the later. Currently untested: Windows and performance measurements.
How to test:
- Make sure pdo_sqlite php extension is loaded
- Run the unit tests
- Test implementation with a setup like this:
$TYPO3_CONF_VARS['SYS']['useCachingFramework'] = '1';
$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['cache_pages'] = array(
'frontend' => 't3lib_cache_frontend_StringFrontend',
'backend' => 't3lib_cache_backend_PdoBackend',
'options' => array(
'dataSourceName' => 'sqlite:/tmp/test.db',
'username' => '',
'password' => '',
),
);
(issue imported from #M14655)
Files