[TYPO3-english] DB Backend Caching Framework usage in own extension
Viktor Livakivskyi
v-tyok at mail.ru
Mon Nov 5 15:38:55 CET 2012
Hi, List.
I'm trying to enable DB Backend usage in an own extension. Everything works
as expected, except fact, that cache tables are assumed to be created in
wrong place...
Let me explain a bit detailed.
As written at wiki [1], I don't need to create tables manually by defining
ext_tables.sql - the only thing I need, is to define my cache in
ext_localconf.php
So, I did it, installed extension, but "Database Update" tab doesn't show
CREATE definitions for my defined cache. I was trying to find the reason,
and later noticed, that these definitions are contained within "Database
Update" of totally different extension, which has no relation to mine.
After creation of these tables, cache is visible and I can work with it
inside of my code - that was ok, but I still was terrifying myself with a
problem of wrong appearance of db tables creation of my cache, so I tried to
play'n'test. At the end I made a really simple extension with only
ext_emconf.php and ext_localconf.php
ext_localconf.php:
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
if(!isset($TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['px_feuprofile']['backend']))
{
$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['px_feuprofile']['backend']
= 't3lib_cache_backend_DbBackend';
$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['px_feuprofile']['options']['compression']
= true;
}
?>
And installed it at 'Introduction Package'. As a result, I've got same
problem: no CREATE definitions at "Database Update" of my ext, but it
appears at "Database Update" of 'foreigntabletest'...
TYPO3 4.7.4
Am I doing something wrong?
[1]: http://wiki.typo3.org/Caching_framework#t3lib_cache_backend_DbBackend
More information about the TYPO3-english
mailing list