Updated to use the Redis setex function