cache = new DbStatementCache($dbConn); } public function getUser(string $userId): ?UserInfo { $stmt = $this->cache->get('SELECT user_id, UNIX_TIMESTAMP(user_created), UNIX_TIMESTAMP(user_restricted), user_size_multiplier FROM prm_users WHERE user_id = ?'); $stmt->addParameter(1, $userId); $stmt->execute(); $result = $stmt->getResult(); return $result->next() ? new UserInfo($result) : null; } public function ensureUserExists(string $userId): void { $stmt = $this->cache->get('INSERT IGNORE INTO prm_users (user_id) VALUES (?)'); $stmt->addParameter(1, $userId); $stmt->execute(); } }