Having been a FFEMT there have been occasionally on an emergency scene where I have had to restrain an elderly person armed with a cane , If you are at the age that you HAVE to use a cane then your core strength ,balance and speed are not going to make it effective, remember you can only swing the cane once it is an impact weapon highly dependent on the contact on the target being at the sweet spot.. The cane is not your answer it is your distraction.
Always carry multiple avenues of defence, your cane,your pepper spray, a knife,a blackjack or sap and finally your firearm.
Never just show a weapon hoping to frighten an adversity they usually do not operate alone. Remember the old saw, being forewarned is forearmed. It works for them also they already see the cane.
Mayhaps we need to develop a pepper spray cane but as others have said here what if the offender is attacking from upwind??