We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How disable modelmetadata in developer.

Hi, i need disable model metadata, how make this?



58.1k

https://docs.phalcon.io/en/3.2/db-models-metadata

According to the document:

Memory adapter is the default. The metadata is cached only during the request. When the request is completed, the metadata are released as part of the normal memory of the request. (Recommended for Development)

You can use like that:

$di['modelsMetadata'] = function() 
{
    $metaData = new \Phalcon\Mvc\Model\MetaData\Memory();
    return $metaData;
};

Thanks for the info @Ahmet