I am using Python with VS code to connect to a AWS Redis Elasticache Cluster (6.2 which has GETEX). I am able to connect to the cluster fine and make a get call. I am also able to make a setex call in another method. However when I make a getex call with the code below :
def redis_getex(text):
try:
logging.basicConfig(level=logging.DEBUG)
if(redis.ping()):
return_id = redis.getex(text,100)
if return_id is None:
return None
else:
return return_id
else:
print("Redis Connection Failed")
except Exception as e:
print(e)
return None
I get a error message, ever though the I can find the reference to the getex call
'Redis' object has no attribute 'getex'
Any help would be great.