I where just trying Redis for data cache and copied pasted the example code from the official docs but when I am pinning the server it throwing an error that Failed to connect to Redis: Error 10061 connecting to localhost:6379. No connection could be made because the target machine actively refused it. the server isn't working any guesses what probably can be the issue?
import redis
cache = redis.Redis(host='localhost', port=6379, decode_responses=True)
cache.ping()