I will never deliberately spoil something for someone, however, there comes a point where I will not dance around a plot point in conversations just for the sake of someone I am unaware of who "might" not have seen/read/heard about it yet.
For TV shows it's usually until the newest episode airs.(grace period of one week for season finales)
For games it's a period of 6 months to a year, because usually those who care about spoilers will have played it by that usual time frame.
Books it's until the next one in the series comes out, or in the case of a final installment I just keep my trap shut for a few years just to be safe.
Movies are a bit tricky, typically it's right around the time of the dvd release that I stop being careful.(because by then trailers, television, and the dvd box have already done so)
Too be honest though, if you're trying to avoid spoilers for something it will become increasingly hard for you to do so, the longer you go without watching/playing/reading the subject in question. When it comes to spoilers on the internet though it's a good rule of thumb to just avoid any topic discussing whatever it is you don't want spoiled. In my experience, nine time out of ten it's the carelessness of the one who reads a spoiler who is at fault for getting it spoiled. The other 10% of the time it's some douchebag who's doing it for the lulz.