In reply to Max factor:
As other's have mentioned though, it's all about timeframes here. If there's a good chance of needing the money in the next 5 years, say you're saving for a deposit, or just saving up an emergency fund etc then cash can be a good option.
With investing, the longer the time frame, the better. The longer you can invest, the more likely it is that a well diversified investment portfolio will significantly out perform cash. So yes, during the next 2-3 years it's true that when factoring in inflation, your investments may not do any better than cash. There's a good chance they will do worse than cash, maybe significantly so over the next 2-3 years, or vice versa, they might end up blowing cash returns out of the water. Nobody knows.
Personally, I just ask myself the following questions; What is the money for, and when am I likely to need or want it? General rule of thumb is if the timeframe is less than 5 years, or if it's for say an emergency fund or cash buffer, then cash is a good option. For anything beyond 5 years, investing starts to become the better option. So just ask those basic questions, and let that guide you.
One thing to avoid, is not investing just because the short-term volatility and news scares you. That's called timing the market, and it's generally a futile exercise.
This excellent video below explains it much better than I've done, and is well worth a watch.