Open
Description
I have a Model ImplementingAgency.php
ImplementingAgency extends ActiveRecord\Model {
static $cache = TRUE;
function Targets() {
$count = Model1::find_by_sql("select count(id) as total where implementing_agency_id = {$this->id}");
return $ocunt[0]->total;
}
function Assignments() {
$count = Model2::find_by_sql("select count(id) as total where implementing_agency_id = {$this->id}");
return $ocunt[0]->total;
}
}
Now the problem is, when i call these two functions on same page, both return same result when cache is set to TRUE and when i set it to FALSE, both starts returning correct result.
Can you please tell why?