Fixed #22867 Pickling models is slow in alpha versions

How about `@lru_cache` on `get_git_changeset()` instead? I'm not a huge fan of `@lru_cache` with `maxsize=None`.