Structure Damage Cap

i have a quick question about Damage Cap.

is the Cap applied “per strcture” or “per attacking ship”
meaning the 5k/20s for a medium structure is the total damage applied to it at the same time OR the total damage a single ship can apply to it?

Per structure.