Added resetLocalStorage flag

Added resetLocalStorage flag to reset the localStorage on adapter creation.