For old (in-flight) asset definitions, we should be able to retrieve the Git history for the corresponding versions file, and locate the latest file whose asset version matches the requested asset version. Then we use the commit id of the versions file at that time to retrieve the asset content. Then we can store this info in AssetRefCache.
For retrieving all process defs, we could scan all version file histories and perform similar logic.
For old (in-flight) asset definitions, we should be able to retrieve the Git history for the corresponding versions file, and locate the latest file whose asset version matches the requested asset version. Then we use the commit id of the versions file at that time to retrieve the asset content. Then we can store this info in AssetRefCache.
For retrieving all process defs, we could scan all version file histories and perform similar logic.