Issue Feature Closed

#22836Caching framework: Implement PDO backend

Christian Kuhn 06/07/10, 22:29 updated 07/02/10, 11:14

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.