Pass along revision in dynamic code fetch
# What does this PR do?

The `revision` argument wasn't passed along to `cached_file` when fetching a dynamic config/modeling file, this PR fixes that.
Partially fixes #21662
_The documentation is not available anymore as the PR was closed or merged._