FHM08062601IBL - tambah endpoint delete_cache di Rv_patient untuk hapus patient_print_cache setelah BIRT selesai load
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1082,4 +1082,21 @@ private function get_fallback_report($group_name, $type, $ready_print)
|
||||
$this->sys_ok(['cached' => true]);
|
||||
}
|
||||
|
||||
public function delete_cache()
|
||||
{
|
||||
$prm = $this->sys_input;
|
||||
$order_id = intval($prm['order_id'] ?? 0);
|
||||
if ($order_id > 0) {
|
||||
$this->db_smartone->query(
|
||||
"DELETE FROM patient_print_cache WHERE ppc_order_id = ? OR ppc_created < NOW() - INTERVAL 5 MINUTE",
|
||||
[$order_id]
|
||||
);
|
||||
} else {
|
||||
$this->db_smartone->query(
|
||||
"DELETE FROM patient_print_cache WHERE ppc_created < NOW() - INTERVAL 5 MINUTE"
|
||||
);
|
||||
}
|
||||
$this->sys_ok(['deleted' => true]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user