We should be using as many caches as possible so what about something like this:
{
"repository": "url"
}repo_cache() {
local registry=$1
local repository=$2
local target=$3
local url=$(cat registry | jq ."['$repository']" )
# Expand url, etc....
}