We feel cash in the bank is the right place for 6 months spare expenditure, a holiday fund and tax purposes in the next 12 months.
Once this is covered then any spare income or capital can be invested and the simple answer is the longer the better, at least 3-5 years but preferably more. The longer you leave investments the more risk you can afford to take.