[NFR]: Global variable for reusable in ORM
In every model every relationship does not use cache. If I want to use cache I have to write 'reusable' => true:
$this->hasOne(
'inv_cst_id',
Customers::class,
'cst_id',
[
'alias' => 'customers',
'reusable' => true,
]
);
My proposal: add new global option: phalcon..orm.reusable = false if I don't write in relationship "'reusable' => true" but I write phalcon..orm.reusable = true then will be the same like I write "'reusable' => true".
Priority of global variable would be less than option "reusable" written in relationship.
The offer is good, but dangerous
why dangerous?
@zak-wojtek77 A very large amount of data from the DBMS may get into the cache. If you do this thing, you should turn it off by default.
I agree with @TimurFlush. This can be abused if set to true by default.
Closing in favor of https://github.com/phalcon/cphalcon/issues/14608
Please vote for this feature there
I agree with @TimurFlush. This can be abused if set to
trueby default.
Of course by default it should be 'false'.