Then there is stuff that you need to know right now which is really just the whims of fashion, the latest abstraction layer over Javascript (JQuery? Coffeescript? I lose track) or web framework and the latest fad methodology (Scrum, TDD or whatever). This is stuff that ages very quickly, in just a year's time your skills could be obsolete. I pick up just as much of these kinds of skills as I need, but there's no point investing serious time into them. These guys are running flat out just to keep up. It must be exhausting.
5 years mastering C is an investment in your future. 5 years mastering MongoDB probably isn't.
Replace C with COBOL and MongoDB with MySQL.
I've thought about this recently, and I think Java may replace C as the investment. There's so many companies now that depend on it, that knowing the JVM and it's... oddities is an investment.
I think MongoDB now is a bet. It may actually pan out, but we will not know until 10+ years out.
The first two are relative new, although they are likely to be seen as timeless after enough time has passed.
In fact in the early nineties I was chastised for practicing what has essentially become test driven development. I apparently didn't have enough confidence to write the whole thing at once and (maybe) test it later.
API, libraries, and platform are specifics. It's something you learn and throw away (eventually).
Continuous deployment, unit testing, debugging, basic programming knowledge, are timeless.
One thing to keep in mind: Even timeless knowledge will be subjected to decay if you don't practice it.