Skip to content

When memcache is enabled, all queries result same values #493

Open
@raakeshkumar

Description

@raakeshkumar

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions