Has SCOTUS ruled that the police do not have a duty to protect? I remember it that way.
If so, I wonder how that applies here.
They did rule to that effect. However ...
I'm not a lawyer, and I don't know what case to look up to even read the decision as a layman. In general, I think the case applies in general to a police department not having a duty to protect a specific person or persons. Without reading the decision, I don't know how (or if) that would apply to, for example, an officer working an off-duty gig in uniform as perhaps security at a bank. In such a case, he is not just "a cop" patrolling an area of the municipality, he is being paid specifically by the bank to be there in the bank to protect the bank, it's money, and its customers. I'm going to guess that the SCOTUS "no general duty to protect" case would not apply.
I view a school security officer in the same light. He wasn't a patrol officer, out walking a beat or driving a route. He was specifically assigned to ONE school, ostensibly for the purpose of providing security for the students and teachers in that school. [Of course, we know in hindsight that his real function was to whitewash disciplinary problems affecting students of color, but that's another story). "Caregiver" or not, I think the unique circumstances attaching to a school resource officer take the "no general duty to protect" argument off the table.