DB IO cache reset flag add to ignore warning, and ignore cache reset warning in Login class

This commit is contained in:
Clemens Schwaighofer
2025-04-16 17:44:42 +09:00
parent 94eb1c7697
commit ae125ea45e
2 changed files with 6 additions and 4 deletions

View File

@@ -1154,7 +1154,7 @@ class Login
$q $q
); );
// reset any query data that might exist // reset any query data that might exist
$this->db->dbCacheReset($q, $params); $this->db->dbCacheReset($q, $params, show_warning:false);
// never cache return data // never cache return data
$res = $this->db->dbReturnParams($q, $params, $this->db::NO_CACHE); $res = $this->db->dbReturnParams($q, $params, $this->db::NO_CACHE);
// query was not run successful // query was not run successful

View File

@@ -2942,12 +2942,14 @@ class IO
* data to create a unique call one, optional * data to create a unique call one, optional
* @return bool False if query not found, true if success * @return bool False if query not found, true if success
*/ */
public function dbCacheReset(string $query, array $params = []): bool public function dbCacheReset(string $query, array $params = [], bool $show_warning = true): bool
{ {
$this->__dbErrorReset();
$query_hash = $this->dbBuildQueryHash($query, $params); $query_hash = $this->dbBuildQueryHash($query, $params);
// clears cache for this query // clears cache for this query
if (empty($this->cursor_ext[$query_hash]['query'])) { if (
$show_warning &&
empty($this->cursor_ext[$query_hash]['query'])
) {
$this->__dbWarning(18, context: [ $this->__dbWarning(18, context: [
'query' => $query, 'query' => $query,
'params' => $params, 'params' => $params,