Project

General

Profile

Actions

Feature #22836

closed

Caching framework: Implement PDO backend

Added by Christian Kuhn over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Caching
Target version:
-
Start date:
2010-06-07
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

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

14655_01.diff (33.7 KB) 14655_01.diff Administrator Admin, 2010-06-07 22:36
14655_02.diff (33.9 KB) 14655_02.diff Administrator Admin, 2010-06-09 01:28
Actions

Also available in: Atom PDF