Connecting to Redis from localhost
The first thing you should make sure is the VPC Security Group that the Elasticache Redis is attached, allows Custom TCP traffic from your address to port number 6379 (default for Redis). 
For me the connection timed out issue arised due to the inaccessibility to the VPC where the Redis cluster resides.
I am using ElastiCache for Redis on AWS. But, I'm not able to connect to Redis from localhost. I have used the endpoint on AWS. It always shows connection timed out. Is there a way to make it work?