Exemple #1
0
 /**
  * Load the table dependencies for dynamic cache breaking.
  */
 private static function load_dependants()
 {
     self::$dependants = [];
     if (class_exists('\\classes\\db')) {
         if (!db::table_exists('_cache_dependants')) {
             db::create_table('_cache_dependants', ['key' => 'INT', 'hash' => 'BINARY(16)']);
         }
         $res = db::query('SELECT * FROM _cache_dependants');
         while ($row = db::fetch($res, false)) {
             self::$dependants[$row['key']] = $row['hash'];
         }
     }
 }