Auth middleware cache fix