Well, generally, it depends on the kind of secret you're actually hiding.
Is it gonna harm you or someone else if disclosed?
Or are you gonna be haunted by it if kept a secret.
For as long as you won't be haunted by it, then you can keep it, if its really a secret.
I have kept a secret for well over 12 years and I don't intend exposing it.