Now the vc item's cache expires when the item is updated

This commit is contained in:
Alejandro Gallardo Escobar 2019-05-27 16:40:09 +02:00
parent f8a0fc67f9
commit fb8bc48d64
1 changed files with 10 additions and 0 deletions

View File

@ -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;