Dataloader re-initialize dataset after each iteration?

functools.lru_cache() actually will not work because of the issue mentioned in this thread.