I'm trying to setup model meta data caching as suggested in the manual: https://docs.phalcon.io/en/latest/reference/models.html#caching-meta-data
$di->setShared('modelsMetadata', function() {
// die('never dies here');
$metaData = new \Phalcon\Mvc\Model\MetaData\Apc(array(
"lifetime" => 86400,
"prefix" => 'my-app'
));
return $metaData;
});
However, it does not work. This service is never called (setting a breakpoint in it or dying does not stop the application there). In my DB query log I still see those meta-data related SQL queries such as:
SELECT TC.COLUMN_NAME, TC.DATA_TYPE, TC.DATA_LENGTH, TC.DATA_PRECISION, TC.DATA_SCALE, TC.NULLABLE, C.CONSTRAINT_TYPE, TC.DATA_DEFAULT, CC.POSITION FROM ALL_TAB_COLUMNS TC LEFT JOIN (ALL_CONS_COLUMNS CC JOIN ALL_CONSTRAINTS C ON (CC.CONSTRAINT_NAME = C.CONSTRAINT_NAME AND CC.TABLE_NAME = C.TABLE_NAME AND CC.OWNER = C.OWNER AND C.CONSTRAINT_TYPE = 'P')) ON TC.TABLE_NAME = CC.TABLE_NAME AND TC.COLUMN_NAME = CC.COLUMN_NAME WHERE TC.TABLE_NAME = 'AC_USER' AND TC.OWNER = 'common' ORDER BY TC.COLUMN_ID
I also tried implementing the getModelsMetaData method in my models but that is never called by Phalcon either.
Using Phalcon 1.2.4, DB is Oracle 10g, PHP 5.4.23, APC 3.1.13.
Are there any additional steps required to configure model meta data caching?