Added resetLocalStorage flag to reset the localStorage on adapter creation