ZF-11677: CLONE - Zend_Application_Resource_Multidb with CacheManager doesn't cache
Description
I have configured Multidb with CacheManager as per documentation (see below). No errors in logs, full access to filesystem, everything should work like charm, the only problem is that no cache is created...
;1) CacheManager configuration:
resources.cachemanager.database.frontend.name = Core
resources.cachemanager.database.frontend.customFrontendNaming = false
resources.cachemanager.database.frontend.options.lifetime = 7200
resources.cachemanager.database.frontend.options.automatic_serialization = true
resources.cachemanager.database.backend.name = File
resources.cachemanager.database.backend.customBackendNaming = false
resources.cachemanager.database.backend.options.cache_dir = APPLICATION_PATH "/../temp/cache"
resources.cachemanager.database.frontendBackendAutoload = false
;2) Multidb configuration:
resources.multidb.defaultMetadataCache = "database"
resources.multidb.db1.adapter = "pdo_mysql"
resources.multidb.db1.host = "localhost"
resources.multidb.db1.username = "webuser"
resources.multidb.db1.password = "XXXX"
resources.multidb.db1.dbname = "db1"
resources.multidb.db1.default = true
resources.multidb.db2.adapter = "pdo_pgsql"
resources.multidb.db2.host = "example.com"
resources.multidb.db2.username = "dba"
resources.multidb.db2.password = "notthatpublic"
resources.multidb.db2.dbname = "db2"
Comments
Posted by Eugene Istrati (eistrati) on 2011-08-16T20:26:15.000+0000
Why this issue was closed? It is not fixed at all... I am expecting caching files to be created in APPLICATION_PATH "/../temp/cache", but instead it does nothing!
Posted by Ramon Henrique Ornelas (ramon) on 2011-08-16T21:38:08.000+0000
And I'm expected information more detailed, something this line see http://tinyurl.com/HowToReportABug. Also I wonder what was your error for the reproduction https://gist.github.com/1129015, Please try reproduced with this, but I need of a response of your reproduction.
Greetings Ramon
Posted by Eugene Istrati (eistrati) on 2011-08-17T15:25:16.000+0000
THIS IS THE SCRIPT THAT I HAVE RUN ON MY ENVIRONMENT:
<?php //@see ZF-10543
// Set default timezone date_default_timezone_set('America/New_York');
// Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(FILE) . '/application'));
// Define application environment defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
// Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), get_include_path(), )));
require_once 'Zend/Loader/Autoloader.php'; Zend_Loader_Autoloader::getInstance();
$application = new Zend_Application('production', './application/configs/application.ini'); $application->getBootstrap() ->setContainer(Zend_Registry::getInstance()) ->bootstrap();
_setupTable(); _asserts();
function _setupTable() { global $db1, $db2;
}
function _asserts() { global $db1, $db2;
}
function _dropTable() { global $db1, $db2; try { $db1->query('DROP TABLE zf11636'); } catch (Exception $e) {
}
THIS IS THE OUTPUT THAT I AM SEEING:
Warning: assert(): Assertion failed in C:\Eugene\localhost\Billing\testing.php on line 70
Call Stack: 0.0098 357832 1. {main}() C:\Eugene\localhost\Billing\testing.php:0 0.2185 5536704 2. _asserts() C:\Eugene\localhost\Billing\testing.php:34 0.2543 5545536 3. assert() C:\Eugene\localhost\Billing\testing.php:70
Posted by Ramon Henrique Ornelas (ramon) on 2011-08-19T02:05:51.000+0000
@Eugene Thanks by your response ;). I did change in script https://gist.github.com/1129015 added constant DIR_CACHE, change to your directory cache. The expected of your feedback ;).
Since already thank you. Greetings Ramon
Posted by Eugene Istrati (eistrati) on 2011-08-21T16:50:53.000+0000
Sure! Please give me couple of days as I'm now traveling and will be back soon...
Posted by BenoƮt Durand (intiilapa) on 2011-08-21T19:00:57.000+0000
Please use tag code : this improves the reading.
Posted by Eugene Istrati (eistrati) on 2011-08-22T20:55:49.000+0000
Same thing:
Posted by Ramon Henrique Ornelas (ramon) on 2011-11-22T09:22:46.000+0000
Sorry the delay to response. But I was really busy. You can verify the dir_cache is writable (is_writable) or simulate in another enviroment to verify the diff (if this fine work).
Greetings Ramon
Posted by Ramon Henrique Ornelas (ramon) on 2012-06-10T10:48:13.000+0000
Need of more information about last comment. Case persist this problem feel free to reopen ;).
Greetings, Ramon