Add cache clearing after token deletion

Ensure token consistency by clearing it from the cache after deletion from the database. This prevents potential issues with stale data in the caching layer.
This commit is contained in:
Jepp9350
2025-01-22 17:48:15 +01:00
parent 7c8306004e
commit cfb4689c4d
+3
View File
@@ -80,5 +80,8 @@ class tokens_o extends db
// Prepare the SQL statement
$sql = "DELETE FROM $this->table WHERE token = '$token'";
$db->query($sql);
// Clear the token from the cache
redis->clear_token($token);
}
}