Esclusione esecuzione hook inutilizzati
This commit is contained in:
parent
a5034e8d0b
commit
6ac418e27f
|
@ -52,21 +52,23 @@ abstract class CachedManager extends Manager
|
||||||
{
|
{
|
||||||
$hook = self::getHook();
|
$hook = self::getHook();
|
||||||
|
|
||||||
// Rimozione cache precedente
|
if( !empty($hook) ){
|
||||||
$database = database();
|
// Rimozione cache precedente
|
||||||
$database->delete('zz_hook_cache', [
|
$database = database();
|
||||||
'hook_id' => $hook->id,
|
$database->delete('zz_hook_cache', [
|
||||||
]);
|
'hook_id' => $hook->id,
|
||||||
|
]);
|
||||||
|
|
||||||
// Aggiunta del risultato come cache
|
// Aggiunta del risultato come cache
|
||||||
$cache = json_encode($results);
|
$cache = json_encode($results);
|
||||||
$database->insert('zz_hook_cache', [
|
$database->insert('zz_hook_cache', [
|
||||||
'hook_id' => $hook->id,
|
'hook_id' => $hook->id,
|
||||||
'results' => $cache,
|
'results' => $cache,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
self::$cache = $results;
|
self::$cache = $results;
|
||||||
self::$is_cached = null;
|
self::$is_cached = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function isCached()
|
public static function isCached()
|
||||||
|
|
Loading…
Reference in New Issue