SAN FRANCISCO — Cavaliers coach Tyronn Lue said Doc Rivers is his biggest coaching mentor, but he credits Knicks president Phil Jackson for his demeanor on the bench and how he deals with the players.

Lue’s spent his first three seasons as a player with the Lakers, and was a part of two championships under Jackson. Lue saw how poised Jackson was and how he handled situations. It’s helped him after the Cavaliers fell behind 3-1 in the NBA Finals to the Warriors. The series is now tied with a winner-take-all Game 7 Sunday.

“Just the poise from my first three seasons of being in L.A. with Phil Jackson and just seeing how he’s in practice, he’s teaching, he’s coaching, he’s on the floor,” Lue said. “But when the game started, he was always poised and he let the guys figure it out. I think that meant a lot to me just seeing that because as players, if you’re sitting on the bench and you hear coaches talking about certain players on the floor or getting mad or getting upset, you realize they say the same thing about you when you go in the game.

“I just think it’s important to stay poised. Guys are going to make mistakes. It’s part of the game. But the effort that can always be there, the unselfishness, that can always be there. So I just attribute the calmness to Phil Jackson and just seeing as a player what works and what doesn’t.”

Rivers is known as a player’s coach and has a good temperament. Lue played for Rivers in Orlando and eventually joined his staff with the Celtics. Lue also was with Rivers as an assistant with the Clippers before being hired by the Cavaliers as an associate head coach last year. Lue replaced David Blatt midway through this season.

“Everything I do is Doc Rivers-driven,” Lue said. “He taught me everything as far as being a coach, giving me my first chance to coach.”