From fb8bc48d642ee15a7f6a95cfe77f25c3706c3e88 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 27 May 2019 16:40:09 +0200 Subject: [PATCH] Now the vc item's cache expires when the item is updated --- .../include/ajax/visual_console_builder.ajax.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 0733161c61..8c83322f1f 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -1073,6 +1073,16 @@ switch ($action) { ['id' => $id_element] ); + // Invalidate the item's cache. + if ($result !== false && $result > 0) { + db_process_sql_delete( + 'tvisual_console_elements_cache', + [ + 'vc_item_id' => (int) $id_element, + ] + ); + } + $return_val = []; $return_val['correct'] = (int) $result; $return_val['new_line'] = $new_line;