How long must things be guarded as spoilers?

Is it a week after an episode airs? A month? That years award season? Or are some things forever protected by spoiler warnings in case someone doesn't stumble upon it for decades? For instance, is it still spoiler worthy to reveal what happened at the climax of Empire Strikes Back? What About Episode VII? Or how The Sopranos ended? Or if Snape was good or bad?

I'm curious as to what you all feel is the appropriate amount of time to protect things by spoilers. Does the medium matter in it at all?

Take care all.