I'm trying to implement models metadata. It's working in memory \Phalcon\Mvc\Model\Metadata\Memory()
but it's not working with \Phalcon\Mvc\Model\Metadata\Files( )
.
The metaDataDir
is writable (777) but no files are being written.
$modelsMetadata = new \Phalcon\Mvc\Model\Metadata\Files([
'metaDataDir' => APPLICATION_PATH . "/cache/Metadata/",
]);
$di->setShared('modelsMetadata', $modelsMetadata)
Models cahce is working properly.
$frontCache = new \Phalcon\Cache\Frontend\Data([
"lifetime" => $config->metadata->lifetime * 30
]);
$modelsCache = new \Phalcon\Cache\Backend\File(
$frontCache,
[
"cacheDir" => APPLICATION_PATH . "/cache/Data/",
"prefix" => $config->metadata->prefix
]
);
$di->setShared('modelsCache', $modelsCache);
And models manager is also declared.
$modelsManager = new \Phalcon\Mvc\Model\Manager();
$di->setShared('modelsManager', $modelsManager);