[TYPO3-core] FYI24: #14655: Caching framework: Implement PDO backend

Christian Kuhn lolli at schwarzbu.ch
Mon Jun 7 22:45:04 CEST 2010


Attached patch will be committed in 24 hours if nobody vetoes.

Type: Feature (got OK from Benni)

Branches: trunk

BT: http://bugs.typo3.org/view.php?id=14655

FLOW3 added a PDO based cache backend since it was last backported to 
v4. 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)
- Added methods and tests for flushByTags() and findIdentifiersByTags(), 
they are required in v4. The methods are currently pretty simple and 
could 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 them later. Currently untested: Windows and performance measurements.

How to test:
- Make sure pdo_sqlite php extension is loaded
- Run 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' => '',
  ),
);

Regards
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 14655_01.diff
Type: text/x-patch
Size: 34458 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100607/82c7fefb/attachment-0001.bin>


More information about the TYPO3-team-core mailing list